Hello
I currently have the following Macro for one of my many checkboxes in 2007 Excel:
It works perfectly until additional rows are added/deleted before the indicated rows in the code (It changes the number sequence in the workbook). The number sequence stays the same in the code which means I am now hiding rows either before (delete rows) or after (insert rows) the intended rows I want to be hidden. Is there a way to change the above code to remain with the assigned rows regardless of the adding/deleting of rows before it?
I currently have the following Macro for one of my many checkboxes in 2007 Excel:
Code:
Sub CheckBox4_Click()
Rows("96:120").Select
If Selection.EntireRow.Hidden = False Then
Selection.EntireRow.Hidden = True
Else
Selection.EntireRow.Hidden = False
End If
End Sub