Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Selected Tab

Status
Not open for further replies.

davidmreid

Programmer
Nov 30, 2001
16
0
0
US
Could you please tell me how to programmatically change the current tab on a tabstrip control?
 
The Value of a TabControl is the index of the current Page in its Pages collection:
To change to the 2nd tab:
Me![name of TabControl].Value = 1

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Using ordinals:
Code:
Dim tsTest As CustomControl
Set tsTest = Me.Controls("ActiveXCtl0")
tsTest.Tabs(2).Selected = True
Using text values:
Code:
Dim tsTest As CustomControl
Set tsTest = Me.Controls("ActiveXCtl0")
tsTest.SelectedItem = "[i]TextOnTab[/i]"

Hope this helps,
CMP


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top