Which page is active in a tab control

M

Matt West

I am trying to determine which page is displayed on a tab control. I am
trying to get an input box to be displayed when I click on one of the tabs.

What code can I use to do this.

Thanks

Matt
 
D

Dirk Goldgar

Matt West said:
I am trying to determine which page is displayed on a tab control. I
am trying to get an input box to be displayed when I click on one of
the tabs.

What code can I use to do this.

The Value property of the tab control itself is equal to the PageIndex
of the currently active page.

Select Case Me!tabMyTab.Value
Case 0
MsgBox "The first page is active."
Case 1
MsgBox "The second page is active."
' ... and so on
End Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top