Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tab Control (2000)

    Hello I have a tab control that I wish to use for an if statement in VB in a similar way I would use the values from an option button. So instead of the user having to select options buttons and the value of that feeding into my if statement, can some value be taken from the tab control so If tab 1 is selected then do...or if tab two is selected then do...

    Thanks Darren.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Tab Control (2000)

    You can use the On Change event of the tab control, and inspect the Value of the tab control. This is zero-based, i.e. the first tab has Value = 0, the second one has Value = 1 etc. So you can use code like this:

    Private Sub MyTab_Change()
    Select Case MyTab.Value
    Case 0 ' first tab
    ' code to execute if first tab selected
    Case 1 ' second tab
    ' code to execute if second tab selected
    ...
    End Select
    End Sub

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Control (2000)

    Thanks again Hans.

    Darren.

Posting Permissions

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