Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

MultiPage Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick C. Simonds - 23 Sep 2007 17:42 GMT
I want to use a MultiPage control on a UserForm but I seem to be at a loss
to get it to do what I want.

If I click on Tab2 (page 2 of the MultiPage control) I want code that
selects cell A1 of the Engraving worksheet. If I then click on Tab5 (page 5
of the MultiPage control) I want code that selects cell A1 of the Trophy
worksheet. And this would be true of all 8 Tabs. I want each to bring up
it's respective worksheet with cell A1 selected.

Is this possible?
Peter T - 23 Sep 2007 18:15 GMT
If I follow, something like this -

Private Sub MultiPage1_Change()
Dim sShtName As String
Select Case MultiPage1.Value
Case 0: sShtName = "Sheet1"
Case 1: sShtName = "Sheet2"
Case 2: sShtName = "Sheet3"
Case Else
sShtName = Worksheets(1).Name
End Select
Application.Goto Worksheets(sShtName).Range("A1"), True

End Sub

If you want to return the current tab caption for use in a Select case

sPage = MultiPage1.Pages(MultiPage1.Value).Caption
Select Case sPage ' etc

Regards,
Peter T

> I want to use a MultiPage control on a UserForm but I seem to be at a loss
> to get it to do what I want.
[quoted text clipped - 6 lines]
>
> Is this possible?
Patrick C. Simonds - 23 Sep 2007 21:18 GMT
Thank you that works great.

If I might though, is there any way in the UserForm Initialization to have
page1 of the MultiPage control be active?

> If I follow, something like this -
>
[quoted text clipped - 31 lines]
>>
>> Is this possible?
Peter T - 23 Sep 2007 22:00 GMT
Assuming by Page1 you mean the first page whose index is 0,

Me.MultiPage1.Value = 0

But if you always want a particular 'active page' at startup just set it in
design time.

Regards,
Peter T

> Thank you that works great.
>
[quoted text clipped - 36 lines]
> >>
> >> Is this possible?
Patrick C. Simonds - 23 Sep 2007 22:45 GMT
I do not see that as an option.

> Assuming by Page1 you mean the first page whose index is 0,
>
[quoted text clipped - 51 lines]
>> >>
>> >> Is this possible?
Patrick C. Simonds - 23 Sep 2007 22:49 GMT
Sorry. I think what you are telling me is that which ever Page is set active
when you exit the design phase, will be the active page when ever you open
the UserForm.

>I do not see that as an option.
>
[quoted text clipped - 53 lines]
>>> >>
>>> >> Is this possible?
Peter T - 25 Sep 2007 15:59 GMT
Yes that's what I meant. No harm to explicitly set the correct page too, in
say the Userform Initialize event. Just in case a nosy user has been messing
around in the VBE

Regards,
Peter T

> Sorry. I think what you are telling me is that which ever Page is set active
> when you exit the design phase, will be the active page when ever you open
[quoted text clipped - 57 lines]
> >>> >>
> >>> >> Is this possible?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.