Insert new row after hitting enter
right click on sheet tabview codeinsert thissave
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$A$1" Then Exit Sub
Target.Offset(1).Rows.Insert
End Sub
"Jeff" wrote in message
...
I would like to write VBA code that basically inserts a
row in a range after someone fills in a cell and hits
enter. For example, if my range is row1:row4, and someone
enters data in row1, a new row is inserted for row2 after
entry. I have created a a worksheet that is sectioned of
into several categories and I do not want to show
numberous rows unless data entry is required -- i.e., the
section grows the more rows someone enters. Any help is
appreciated.
|