Question regarding tabs

  • Thread starter Thread starter Lauren B.
  • Start date Start date
L

Lauren B.

I have a tab on my form set up so that it is only visible if a particular
check box is checked. The event procedure for this checkbox is as follows:

Private Sub Checkbox1_Click()
If Checkbox1 = True Then
Tab1.Visible = True
Else
Tab1.Visible = False
End If
End Sub

This works initially; however, once this screen is closed, upon re-opening,
the checkbox is still checked but the tab is not visible. In order to make
the tab reappear, the user must unclick and re-click the checkbox.

How can I write this code so that if the check box is checked, the tab will
consistenly stay visible?

Thank you very much for any assistance.
 
Lauren said:
I have a tab on my form set up so that it is only visible if a
particular check box is checked. The event procedure for this
checkbox is as follows:

Private Sub Checkbox1_Click()
If Checkbox1 = True Then
Tab1.Visible = True
Else
Tab1.Visible = False
End If
End Sub

This works initially; however, once this screen is closed, upon
re-opening, the checkbox is still checked but the tab is not visible.
In order to make the tab reappear, the user must unclick and re-click
the checkbox.

How can I write this code so that if the check box is checked, the
tab will consistenly stay visible?

Thank you very much for any assistance.

Run the same code in the Form's Current event.
 
Back
Top