Hi!
I'm seeking to get the following; I have a code for when a checkbox is checked or unchecked; rows hide and unhide. However; when I add a row somewhere in the spreadsheet, the code doesn't automaticcaly adjust. I have the following code;
Private Sub CheckBox4_Click()
If CheckBox4.Value = True Then
Range("65:65,47:54,67:70,82:93,96:116,118:119,125:131,134:138,146:147").Select
Selection.EntireRow.Hidden = True
Else
Range("65:65,47:54,67:70,82:93,96:116,118:119,125:131,134:138,146:147").Select
Selection.EntireRow.Hidden = False
End If
End Sub
So when I add a row; row 47 becomes 48 for instance. This way the code hides the wrong cell!
Does anybody have any ideas on how to make the code automatically adjust accordingly??
Would be much appreciated!
Bookmarks