Get Tab Page Clicked

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
 
S

stefan hoffmann

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 <--
 
R

Rick Brandt

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..).
 
Top