Forum Discussion
Doc441
Apr 02, 2020Copper Contributor
Can you create a checkbox that will hide or show a tab in a worksheet?
If I create a yes/no button could it trigger the hiding or exposing of an additional tab in the same worksheet?
Doc441
Apr 17, 2020Copper Contributor
I guess I just need the excel for dummies step by step version....
I don't understand the HideSheet = Range("A1") line. In particular cell A1 on what page?.
I don't understand the HideSheet = Range("A1") line. In particular cell A1 on what page?.
Riny_van_Eekelen
Apr 17, 2020Platinum Contributor
The variable "HideSheet" is declared as a "Boolean". That means, it can hold TRUE or FALSE.
A1 is the cell that is linked to the CheckBox. Check the box and A1 becomes TRUE. Uncheck the box and A1 becomes FALSE.
The code "If HideSheet Then" looks if the box was checked. If so, Hide the sheet ELSE unhide it.