Tab Controls- switching from tabs sequentially

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi All,

I'm trying to program the command button to display the
tabs one after another on the click of the button. I have
three tabs (user,information, favorite) and a command
button. I can only program the command buton to display
user and information, but not the favorite. How can I
program the command to display each tabs on a click of a
button.

Thanks for the help...

Mike
 
Hi Mike,

The easiest way to display the tab is to simply set the value of the tab
control. For example:

Private Sub cmdUser_Click()

tabMyTabControl.Value = 0

End Sub

If you're looking to move to the next tab using a wizard type "Next" button,
it might be something like this:

Private Sub cmdNext_Click()

With tabMyTabControl
If Not .Value = .Pages.Count - 1 Then
.Value = .Value + 1
End If
End With

End Sub

Hope this helps,
- Glen
 
Back
Top