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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Tab in code

Status
Not open for further replies.

boborsipho

Programmer
Sep 6, 2002
14
ZA
How do I select a tab in VBA?

What I'm doing is that based on a combo box's value outside the tabs, a MsgBox should be displayed when I click on the tabs. Currently my MsgBox is in Private Sub TabCtl63_Change().

Should it be somewhere else?

If I click on the tabs and the Combobox's value is "Select/Add new entertainment", an error message should be displayed, so that you cannot select any of the tabs.

Now, I want to display the error message if the tabs are changed and then select the default (first) tab, so that it looks as if it cannot change tabs.

Makes sense? Hope so.

Thanks
Bob
 
Hi

To select a given tab within a tab control

tbcCtl.value = n

where n is the tab number, not tab pages are number 0 - n Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top