
Disable/Enable select tabs
yes, you could initialize your tabs in the form_load event, and then
in the tab click event you could use the previous tab property to figure
out which tabs to enable/disable. for instance, the code would look like
the following.
Private Sub Form_Load()
'~~~ by default you could disable the tabs based on the index.
'~~~ lets say at first you want only tab 1 and tab 2 enabled and rest
disabled.
SSTab1.TabEnabled(0) = True
SSTab1.TabEnabled(1) = True
SSTab1.TabEnabled(2) = False
SSTab1.TabEnabled(3) = False
'~~~ now follow the code in tab_click event
End Sub
Private Sub SSTab1_Click(PreviousTab As Integer)
On Error Resume Next
'~~~ when the user selects a tab and the previous tab was one the
following:
Select Case PreviousTab
Case 0: '~~~ user was on first tab ; disable tab 4
'~~~ note index starts with 0 not 1 ; therefore its always tab-1
'~~~ this event comes in handy when the user is moving back and forth
between the
'~~~ tabs.
SSTab1.TabEnabled(3) = False
Case 1: '~~~ user was on second tab , enable tab 4 and disable xxxx
SSTab1.TabEnabled(3) = True
'~~~ and so on depends on what you intend to do.
End Select
End Sub
hope this helps!
cheers
Quote:
> Greetings, I have a tab control with 4 tabs. Is it possible to make 2
> of the tabs "Enabled=False" and back again depending on the condition?
> Jim