Hi All,
I have a spreadsheet (testing - attached) that has several sections with buttons that add and remove rows for that section. In my attached spreadsheet, the add button is only functional for Objectives. My code adds a new row after whatever cell is selected. I need it to go to a cell I've named "OBJ", select the row above it, copy and paste so the cell "OBJ" gets moved down to the next row (to be used if another row is added). The code I have so far is below, it copies the selected row and adds a new row below it, not quite what I am looking for:
Sub AddRowDeleteConstants()
On Error GoTo NoConstants
With ActiveCell.EntireRow
.Copy
.Insert Shift:=xlDown
.SpecialCells(xlCellTypeConstants).ClearContents
End With
Exit Sub
NoConstants:
MsgBox "There were no constants to delete"
End Sub
Any help would be greatly appreciated.
Thanks.
Bookmarks