MultiPage Page Order

S

Sam

I have a UserForm with a Multipage control that has 3 pages. I want to change
the page order of the control when I access the UserForm from different
sheets in my workbook. i.e. MultiPage1 has 3 pages (Cashier, Tender,
Journal). If I access UserForm from Tender worksheet, I want the Tender page
of the MultiPage1 control to be in the 1st position. If accessing the
UserForm from the Journal worksheet I want the Journal page of the MultiPage1
control to be in the 1st position. What code can I use when running
UserForm1.Show to change the page order as described above?

Thanks in advance for any help given.

Sam
 
J

Jim Rech

Private Sub UserForm_Initialize()
Select Case ActiveSheet.Name
Case "Cashier" ''assumed first
Case "Tender"
MultiPage1.Pages(1).Index = 0
Case "Journal"
MultiPage1.Pages(2).Index = 0
End Select
MultiPage1.Value = 0
End Sub


--
Jim
|I have a UserForm with a Multipage control that has 3 pages. I want to
change
| the page order of the control when I access the UserForm from different
| sheets in my workbook. i.e. MultiPage1 has 3 pages (Cashier, Tender,
| Journal). If I access UserForm from Tender worksheet, I want the Tender
page
| of the MultiPage1 control to be in the 1st position. If accessing the
| UserForm from the Journal worksheet I want the Journal page of the
MultiPage1
| control to be in the 1st position. What code can I use when running
| UserForm1.Show to change the page order as described above?
|
| Thanks in advance for any help given.
|
| Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top