View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John T Ingato John T Ingato is offline
external usenet poster
 
Posts: 23
Default Can I set a page of a Multipage form to active?

My question is three fold.

1.. Can I set a page of my mutipage form to whichever tab I choose using VBA. ??? Something like "Userform1.page(1).active" . I know this is Invalid. I am just giving an example of what I am looking for.
2.. Can I detect which tab the end user is working in?
3.. Also can i set page one as the default page to start in. I know its not a big deal, but everytime I adjust my form object and close it, without making sure that page one is the active page, the next time I start the program, the form init fails... more specifically... "Userform1.NameEntry.SetFocus". The reason of course is because that item is on the first page.

My main goal is this:

I have a multipage form with two tabs or pages

Tab 1) for entering and displaying employee names
Tab 2) for entering their location responsibilities

Each tab has an "add" button, and "addbutton1", which is on page 1, is the default button, ( for the enter key )

When the user switches to tab two, I would like to set "addbutton2.default = True. But I need to know where the user is.

I'm sorry if that was confusing. I was trying to be simple, but make sure enough info was shared.

Thank You
John