ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   insert a new row (https://www.excelbanter.com/excel-programming/279733-insert-new-row.html)

nikolaosk[_7_]

insert a new row
 
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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Tom Ogilvy

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

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

--
Regards,
Tom Ogilvy

"nikolaosk" wrote in message
...
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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/





All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com