How to self refer to current control - checkbox (1 Viewer)


Need a good one-liner.
Local time
Today, 20:41
Oct 20, 2008
Hope someone can help. I've been given an Excel spreadsheet and asked to clean it up as it's not doing what it's supposed to. It's a Leave Roster spreadsheet.

What has happened is that 67 checkboxes have been added to individual cells, in the same column.

Each checkbox is named, CheckBox1, CheckBox11 etc. the default names. The checkboxes have been entered haphazardly, not one after the other, going down the column.

Within the click event of each Checkbox, the underlying cell of the Checkbox is set to either true or false, corresponding to the Checkbox value. Now the problem is, when setting the underlying cell, all references are hardcoded eg. (Range("B23").Value), but I soon found out that some of the Checkboxes and Underlying cells do not match up.

Within the click event of the Checkbox, how do I refer to the Checkbox itself. I have already figured out how to determine current row and column but just can't generically reference the Checkbox control.

Any help appreciated.


Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom