HomeGrowth
Technical User
In Excel, I put the code on a button to insert new row
Dim lngRow As Long 'find the last number row
'put in code to verify a row is selected because the code
'will not work.
lngRow = ActiveCell.EntireRow.Cells(1, 1).Row
ActiveCell.EntireRow.Insert '2008 0219 insert the row
Cells(lngRow + 2, 1).EntireRow.FillDown
'put in code to renumber the first field (A2=01; A3=02, A3=03, and so on until the last field IsEmpty).
Right now, I will need code for
1. Verify a row is selected before to insert new row below it.
2. Number the new row and then renumber the following first field with text number (i.e. A6=05, A7=06, A8=07 so on).
Thank you for your help.
Dim lngRow As Long 'find the last number row
'put in code to verify a row is selected because the code
'will not work.
lngRow = ActiveCell.EntireRow.Cells(1, 1).Row
ActiveCell.EntireRow.Insert '2008 0219 insert the row
Cells(lngRow + 2, 1).EntireRow.FillDown
'put in code to renumber the first field (A2=01; A3=02, A3=03, and so on until the last field IsEmpty).
Right now, I will need code for
1. Verify a row is selected before to insert new row below it.
2. Number the new row and then renumber the following first field with text number (i.e. A6=05, A7=06, A8=07 so on).
Thank you for your help.