insert a new row

N

nikolaosk

hi folks!!!!


i have a worksheet and between rows 1 and 2 i insert a new row. how can
i check that the user has indeed entered a row among lines row 1 and
row 2.


when i do a macro and enter a new row then VBA writes this:


Range("A2").Select
Selection.EntireRow.Insert

i do not want that.

i want a way or a workaround that i can check that a new row is
entered.


moreover i want to check if the user entered a new column among columns
B and C.

is there any property where i can check that a column or row is empty?
-has no data and there are just blank entities.



thanks
 
T

Tom Ogilvy

if application.CountA(Rows(1)) = 0 then
' row is blank

if application.CountA(Columns(1)) = 0 then
' column is blank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top