Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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" wrote in message
oups.com...
|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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" wrote in message
oups.com...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete entire page 2 so document shows as 1 page only Elinita New Users to Excel 1 November 22nd 09 06:35 PM
activate a page of a Multipage in Userform Jeff Excel Discussion (Misc queries) 1 February 8th 08 06:16 PM
How do I set the focus to a page in a multipage Azza Excel Programming 2 November 23rd 04 10:42 PM
excel fit to 1 page shows 1 page but not all data is on that page Jans Excel Programming 1 September 2nd 04 01:49 AM
how to put a reference from a page of a multipage form to another page Valeria[_2_] Excel Programming 2 January 25th 04 08:21 AM


All times are GMT +1. The time now is 10:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"