G
Guest
I have a form which opens in Excel that allows users to display/hide tabs.
There’s 60+ tabs so the form allows them to see only the ones they want. The
form contains a series of check boxes that they check, then click on a
display/hide button, and hide the tabs that are not checked. At the end the
form closes.
I would like to change the form so when it is opened, the default for the
check box is based on the status of the tab. If the tab is showing it’s
corresponding check box is checked, if the tab is hidden, the check box is
not checked.
This is a sample of the routine that displays/hides the tabs and works fine
Private Sub DispHide_Btn_Click()
If Tsk_ChkBox = True Then Sheet4.Visible = xlSheetVisible Else:
Sheet4.Visible = xlSheetHidden
If ResComb_Chkbox = True Then Sheet21.Visible = xlSheetVisible Else:
Sheet21.Visible = xlSheetHidden
End Sub
This is a sample of the code I have to open the form, but it doesn’t open
with the check boxes checked. The sheets are visible.
Private Sub OpenForm_Click()
DispHide_Frm.Show
If Sheet4.Visible = True Then Tsk_ChkBox = True
If Sheet21.Visible = True Then ResComb_Chkbox = True
End Sub
Any ideas on how to get the check boxes to open with a true status and
display checked?
Thanks for the help
There’s 60+ tabs so the form allows them to see only the ones they want. The
form contains a series of check boxes that they check, then click on a
display/hide button, and hide the tabs that are not checked. At the end the
form closes.
I would like to change the form so when it is opened, the default for the
check box is based on the status of the tab. If the tab is showing it’s
corresponding check box is checked, if the tab is hidden, the check box is
not checked.
This is a sample of the routine that displays/hides the tabs and works fine
Private Sub DispHide_Btn_Click()
If Tsk_ChkBox = True Then Sheet4.Visible = xlSheetVisible Else:
Sheet4.Visible = xlSheetHidden
If ResComb_Chkbox = True Then Sheet21.Visible = xlSheetVisible Else:
Sheet21.Visible = xlSheetHidden
End Sub
This is a sample of the code I have to open the form, but it doesn’t open
with the check boxes checked. The sheets are visible.
Private Sub OpenForm_Click()
DispHide_Frm.Show
If Sheet4.Visible = True Then Tsk_ChkBox = True
If Sheet21.Visible = True Then ResComb_Chkbox = True
End Sub
Any ideas on how to get the check boxes to open with a true status and
display checked?
Thanks for the help