sparky2205
Well-known Member
- Joined
- Feb 6, 2013
- Messages
- 507
- Office Version
- 365
- 2016
- Platform
- Windows
Hi folks,
I have a Setup WorkSheet in a WorkBook where I dynamically populate a list of the WorkSheet names.
Beside each name I dynamically create a CheckBox.
Currently the user can tick any CheckBox and then click a Hide Worksheets button which runs a macro to hide the selected WorkSheets.
I've been trying to change this so that a user need only tick the CheckBox and the associated WorkSheet will Hide or Unhide without having to click any button.
I have tried a number of things to get this to work but without success.
I'd like to loop through each CheckBox, check its value (TRUE or FALSE) then assign that as the value to the visible property of the associated WorkSheet.
But I don't know where to place this code. It can't be in A CheckBox click event, I think, since there is more than one CheckBox.
I'm including a screenshot of the setup in case this is required.
Any help greatly appreciated.
I have a Setup WorkSheet in a WorkBook where I dynamically populate a list of the WorkSheet names.
Beside each name I dynamically create a CheckBox.
Currently the user can tick any CheckBox and then click a Hide Worksheets button which runs a macro to hide the selected WorkSheets.
I've been trying to change this so that a user need only tick the CheckBox and the associated WorkSheet will Hide or Unhide without having to click any button.
I have tried a number of things to get this to work but without success.
I'd like to loop through each CheckBox, check its value (TRUE or FALSE) then assign that as the value to the visible property of the associated WorkSheet.
But I don't know where to place this code. It can't be in A CheckBox click event, I think, since there is more than one CheckBox.
I'm including a screenshot of the setup in case this is required.
Any help greatly appreciated.