Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default MultiPage Control

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default MultiPage Control

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


"Patrick C. Simonds" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default MultiPage Control

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?


"Peter T" <peter_t@discussions wrote in message
...
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


"Patrick C. Simonds" wrote in message
...
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?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default MultiPage Control

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

"Patrick C. Simonds" wrote in message
...
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?


"Peter T" <peter_t@discussions wrote in message
...
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


"Patrick C. Simonds" wrote in message
...
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?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default MultiPage Control

I do not see that as an option.

"Peter T" <peter_t@discussions wrote in message
...
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

"Patrick C. Simonds" wrote in message
...
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?


"Peter T" <peter_t@discussions wrote in message
...
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


"Patrick C. Simonds" wrote in message
...
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?









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default MultiPage Control

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.


"Patrick C. Simonds" wrote in message
...
I do not see that as an option.

"Peter T" <peter_t@discussions wrote in message
...
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

"Patrick C. Simonds" wrote in message
...
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?


"Peter T" <peter_t@discussions wrote in message
...
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


"Patrick C. Simonds" wrote in message
...
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?








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default MultiPage Control

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


"Patrick C. Simonds" wrote in message
...
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.


"Patrick C. Simonds" wrote in message
...
I do not see that as an option.

"Peter T" <peter_t@discussions wrote in message
...
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

"Patrick C. Simonds" wrote in message
...
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?


"Peter T" <peter_t@discussions wrote in message
...
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


"Patrick C. Simonds" wrote in message
...
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?










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
multipage control JT Excel Programming 1 September 6th 07 04:20 PM
MultiPage control Patrick Simonds Excel Worksheet Functions 1 August 5th 06 05:32 PM
Set Focus Problem for textbox control on multipage control ExcelDeveloperSPR Excel Programming 1 July 16th 04 08:54 PM
MultiPage Control Todd Huttenstine Excel Programming 7 May 13th 04 05:16 AM
MultiPage control George[_18_] Excel Programming 0 February 6th 04 03:33 PM


All times are GMT +1. The time now is 09:56 PM.

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

About Us

"It's about Microsoft Excel"