Get Tab Page Clicked

  • Thread starter Thread starter Alan Z. Scharf
  • Start date Start date
A

Alan Z. Scharf

How can I capture the name or index of the tab page clicked on the tabl
control.

I need to set a control visible for some tab pages and invisible for others.

Thanks.

Alan
 
hi Alan,
How can I capture the name or index of the tab page clicked on the tabl
control.
I need to set a control visible for some tab pages and invisible for others.
Use the Change event of the tab control. You can use the Value property
to determine the correct tab or use the Pages() collection to use real
names:

Private Sub TabControl_Change()

Select Case TabControl.Pages(TabControl.Value).Name
Case Is = "Tab1"
End Select

End Sub


mfG
--> stefan <--
 
Alan Z. Scharf said:
How can I capture the name or index of the tab page clicked on the tabl
control.

I need to set a control visible for some tab pages and invisible for others.

Use the Change event of the TabControl (not an event of a particular page).
Then you test the Value property of the TabControl to determine which page was
selected (0 = page1, 1 = page2, etc..).
 

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

Back
Top