Tab control

  • Thread starter Thread starter wd1153
  • Start date Start date
W

wd1153

Hi

is there anyway to make certain page on a tab control as
the active one programmatically in VBA? Thanks in advance.
 
Set the value of the tab control to the index of the page you want to
activate.

HTH
- Turtle
 
wd1153 said:
is there anyway to make certain page on a tab control as
the active one programmatically in VBA? Thanks in advance.


Me.tabCtl.Pages(pagenumber).Controls(0).SetFocus

You can set the focus to any control on the page if you
don't want to use the first control.
 
MacDermott said:
Set the value of the tab control to the index of the page you want to
activate.


Good point Turtle. Just to double check I tried
Me.tabCtl = 1
and got an error message. So I tried
Me.tabCtl.Value = 1
and it worked just fine. That's certainly more
straightforward to use when you don't care what control has
the focus.
 
Back
Top