How open tabbed form at given tab ?

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?
 
J

Jim Allensworth

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top