LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default MultiPage UserForm

I have a UserForm with a MultiPage control. The MultiPage has 4 pages
(.Value = 0 through 3). Everything works fine until I add another page. I
have a CommandButton on the UserForm that directs the user to the Next
page. When MultiPage.Value = 0, the following code is run:

Select Case MultiPage1.Value
Case 0 ' If Page1 is active...
With MultiPage1
.Value = MultiPage1.Value + 1 ' Move forward 1 page
.Pages(1).Enabled = True ' Enable Page2.
.Pages(0).Enabled = False ' Disable Page1.
End With
CommandButton1.Enabled = True ' Enable Back button.
cbRanges.SetFocus ' Give cbRanges focus.
Case1
Case2
Case3
End Select

When I add a 5th page (MultiPage.Value = 4), and run the code, pressing the
"Next" CommandButton causes MultiPage.Value = 4 rather than 1
(MultiPage1.Value is 0 on Page1, so adding 1 should result in
MultiPage.Value = 1, no?). I am really confused as to why when I add the
5th page, 0 + 1 suddenly equals 4. I could change the index of the pages,
but then the order of the MultiPage would not logically follow the sequence
of events (I know it doesn't matter from a programming perspective, but when
setting this up, I'd like the MultiPage to be in the right order).

TIA
Mike

--
Michael J. Malinsky



 
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
activate a page of a Multipage in Userform Jeff Excel Discussion (Misc queries) 1 February 8th 08 06:16 PM
MultiPage tab? capt Excel Discussion (Misc queries) 2 January 28th 08 08:01 PM
MultiPage OM Excel Discussion (Misc queries) 2 April 7th 06 01:31 PM
How do I use multipage Lawrence M Watt Excel Discussion (Misc queries) 1 October 24th 05 02:55 PM
Multipage Paul Excel Programming 1 July 9th 03 02:34 PM


All times are GMT +1. The time now is 10:19 PM.

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"