+ Reply to Thread
Results 1 to 5 of 5

Setting Page Focus With MultiPage

  1. #1
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Setting Page Focus With MultiPage

    Hi all, I want to set the focus to a page depending on what called the user form. For example
    Please Login or Register  to view this content.
    where if the UserForm1 is running then set the focus to page 2 or if it is not running then set the focus to page 1. Is this possible? My code won't cut it.
    Last edited by Mordred; 12-07-2011 at 02:08 PM.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  2. #2
    Registered User
    Join Date
    10-02-2011
    Location
    Los Angeles, USA
    MS-Off Ver
    2010 Home Version (doesn't include Access and Outlook )
    Posts
    22

    Re: Setting Page Focus With MultiPage

    To set page focus in a userform, I do something like
    Please Login or Register  to view this content.
    Multipage1 being the default name of the first multipage object in the userform.

    So assuming pgHelp is the name of your multipage object, I would try:

    Please Login or Register  to view this content.
    Last edited by Dirigo; 12-07-2011 at 01:54 AM.

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Setting Page Focus With MultiPage

    the first page of multipage is value 0
    the second page is value 1, etc.
    so
    Please Login or Register  to view this content.
    or even
    Please Login or Register  to view this content.



  4. #4
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Setting Page Focus With MultiPage

    Thanks to the both of you.

  5. #5
    Registered User
    Join Date
    10-02-2011
    Location
    Los Angeles, USA
    MS-Off Ver
    2010 Home Version (doesn't include Access and Outlook )
    Posts
    22

    Re: Setting Page Focus With MultiPage

    Wow, snb, solution two is pretty elegant!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1