hello, i am new to VBA and i want to create a macro in excel that add a row when i reach a certain cell. any help appreciated
+3
A:
You can add the below to the SelectionChange event of the worksheet and change the condition as necessary.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Row = 2 Then
Selection.EntireRow.Insert
End If
End Sub
Henryk
2010-09-23 10:49:51