How open tabbed form at given tab ?

  • Thread starter Thread starter David
  • Start date Start date
D

David

In VBA I want to open a tabbed form at a given tab, not
necessarily the first tab. How do I do that?
 
In VBA I want to open a tabbed form at a given tab, not
necessarily the first tab. How do I do that?
There is a Pages collection of a tab control. You just set the focus
to that page.

The collection is zero based so to set the focus to the second tab
use:
Me.tabMyTab.Pages(1).SetFocus

You could place this in the form's Open event or just after the
command to open the form.

- Jim
 
Back
Top