Lets make sure of which tab like control you are using...
Are you using the tab control from Microsoft Windows Common Controls 6.0 (SP6) with a default name of TabStrip1?
If so, then you cannot enable/disable individual tabs but you can check to see which one is selected...
-
If TS1.Tabs(3).Selected = True Then TS1.Tabs(1).Selected = True
-
Which of course would frustrate the user if they did not know what was going on if you did not do something like change the caption of the specific tab to say "Not Allowed" or change its icon to a banned symbol (you know, a red circle with a red slash).
Now, if you are using Microsoft Tabbed Dialog Control 6.0 (SP6) with a default name of SSTab1, you can accomplish what you want like so...
-
SSTab1.TabEnabled(0) = False
-
BTW: The first control I wrote/talked about, in common controls, the tabs are 1 based while the sstab tabs are 0 based....
Good Luck