I am writing some documentation in excel. What I want to do is a hide a row (which I understand how to do). But what I am not sure how to do is assign the range of rows to hide dynamically. For example I have CheckBox1 locked to row A6 which hides range A1:A5. But then later I add 5 rows above A1, thereby moving the data in range A1:A5 to A5:A10 (including checkbox.) My problem is I am still left with the VBA hardcoded to A1:A5, so I am not hiding the correct range.
Is there a variable I can use that references the cell value that the checkbox is located in? Or any other ideas of how to do this?
Thanks for any help.
Bookmarks