Results 1 to 3 of 3

Thread: Tabpage2 [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member GSIV's Avatar
    Join Date
    Jun 2002
    Location
    Texas, USA
    Posts
    213

    Question Tabpage2 [RESOLVED]

    How do you test for the selected tabpage? I have started with the following code, but it is wrong:

    Code:
    If Me.tabPage.SelectedTab = tpgMain Then        '<<---WRONG
         'Change from tpgMain to tpgCensus after timer delay
         tabWorksheets.SelectedTab = tpgCensus
    Else
         'User has already moved off of tpgMain
    End If
    Last edited by GSIV; Nov 28th, 2003 at 08:53 AM.

  2. #2
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    Couldn't you just match the names like:
    VB Code:
    1. Me.TabControl1.SelectedTab.Name = tpgMain.Name Then...

  3. #3

    Thread Starter
    Addicted Member GSIV's Avatar
    Join Date
    Jun 2002
    Location
    Texas, USA
    Posts
    213
    OK CrazyCoder... this is what I got to work. Thanks for kickstarting me
    Code:
            Select Case tabWorksheets.SelectedTab.Name
                Case tpgMain.Name
                    'Change from tpgMain to tpgCensus after timer delay
                    MessageBox.Show("Case")
                    tabWorksheets.SelectedTab = tpgCensus
                Case Else
                    'User has already moved off of tpgMain
                    MessageBox.Show("Case Else")
            End Select

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width