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

How to determine Page on Tab Control 2

Status
Not open for further replies.

illini

Technical User
Aug 2, 2002
89
FR
I'm looking for a way for my program to determine which Page on a Tab Control is active.

My goal is to click a command button and have the program do different functions depending on which page/tab is active.
 
The following should get you what you need. Place this code in the On_Change event of the tab object.

Code:
Dim strValue As String
With Me.TabCtl14 ' Replace with the name of your tab control
     strValue = .page(.value).Caption
End With
Select Case strValue
     Case "Tab Page Name Here"
          'Enter your code here.
     Case "Tab Page Name Here"
          'Enter your code here.
     Case Else
End Select

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top