+ Reply to Thread
Results 1 to 4 of 4

Determining Which Page of MultiPage Initially Shows

  1. #1
    Michael Malinsky
    Guest

    Determining Which Page of MultiPage Initially Shows

    I have UserForm1 with MultiPage1. Page0 has three option buttons, One,
    Two, and Three. If One is selected, the next page shown is Page1 and
    so on. Once the process is complete, the code dumps various
    information into a worksheet (including the value of the option button
    selected).

    If the user runs the code again, instead of initially showing Page0,
    I'd like to initially show the page corresponding to the option button
    selected the first time around. Since I have the selection already in
    the worksheet, I figure I can use that to run a Select...Case, but I
    cannot seem to get the proper page of MultiPage1 to display as desired.
    Page0 always seems to pop up. I'm assuming that I would put this in a
    UserForm_Initialize procedure.

    Thanks,
    Mike.


  2. #2
    Jim Rech
    Guest

    Re: Determining Which Page of MultiPage Initially Shows

    The easiest way to have a userform reappear in the same state as it was in
    when last dismissed (in the same Excel session) is just to use Me.Hide
    instead of Unload with your OK button.

    --
    Jim
    "Michael Malinsky" <[email protected]> wrote in message
    news:[email protected]...
    |I have UserForm1 with MultiPage1. Page0 has three option buttons, One,
    | Two, and Three. If One is selected, the next page shown is Page1 and
    | so on. Once the process is complete, the code dumps various
    | information into a worksheet (including the value of the option button
    | selected).
    |
    | If the user runs the code again, instead of initially showing Page0,
    | I'd like to initially show the page corresponding to the option button
    | selected the first time around. Since I have the selection already in
    | the worksheet, I figure I can use that to run a Select...Case, but I
    | cannot seem to get the proper page of MultiPage1 to display as desired.
    | Page0 always seems to pop up. I'm assuming that I would put this in a
    | UserForm_Initialize procedure.
    |
    | Thanks,
    | Mike.
    |



  3. #3
    Michael Malinsky
    Guest

    Re: Determining Which Page of MultiPage Initially Shows

    But theoretically someone could save, close and reopen the file so that
    won't work, will it?

    Also, just to muddy the waters (and I should have put this in my first
    post)...

    Page0 - select option 1, 2, or 3 (selected option will next show Page1,
    Page2, or Page3)
    Page1 - do stuff then show Page4
    Page2 - do stuff then show Page4
    Page3 - do stuff then show Page4
    Page4 - do stuff then Finish

    So the first time the code is run, it will start on Page0 and end on
    Page4 with Page1, Page2, or Page3 in the middle depending on the option
    button selected in Page0. So hiding the UserForm still won't provide
    the desired result. So if I choose option 2 the first time the code is
    run, I want to start with Page2 if the code is run again.

    Is that clearer?

    Thanks,
    Mike.


  4. #4
    Tom Ogilvy
    Guest

    Re: Determining Which Page of MultiPage Initially Shows

    Assuming worksheet Results in cell A1 holds a value 1, 2, or 3 reflecting
    the option button selected then possibly

    Private Sub Userform_Activate()
    Multipage1.Value = Worksheets("Results").Range("A1").Value
    End Sub

    --
    Regards,
    Tom Ogilvy


    "Michael Malinsky" <[email protected]> wrote in message
    news:[email protected]...
    > But theoretically someone could save, close and reopen the file so that
    > won't work, will it?
    >
    > Also, just to muddy the waters (and I should have put this in my first
    > post)...
    >
    > Page0 - select option 1, 2, or 3 (selected option will next show Page1,
    > Page2, or Page3)
    > Page1 - do stuff then show Page4
    > Page2 - do stuff then show Page4
    > Page3 - do stuff then show Page4
    > Page4 - do stuff then Finish
    >
    > So the first time the code is run, it will start on Page0 and end on
    > Page4 with Page1, Page2, or Page3 in the middle depending on the option
    > button selected in Page0. So hiding the UserForm still won't provide
    > the desired result. So if I choose option 2 the first time the code is
    > run, I want to start with Page2 if the code is run again.
    >
    > Is that clearer?
    >
    > Thanks,
    > Mike.
    >




+ 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