ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MultiPage Control problem (https://www.excelbanter.com/excel-programming/370332-re-multipage-control-problem.html)

Tom Ogilvy

MultiPage Control problem
 
I didn't and I don't see why.

--
Regards,
Tom Ogilvy


"Patrick Simonds" wrote:

My problem seems to resolve around the code at the beginning of my UserForm
Intialization routine. Some how I assume I must also account for the
MultiPage2.



With Me.MultiPage1
.Value = .Pages(myMPPageName).Index
End With





"Patrick Simonds" wrote in message
...
Sorry the problem is not with what you helped me with but in my Userform
initialization. So I will check that out. Again thanks for your help.


"Patrick Simonds" wrote in message
...
Thank you sir, but I still get the Invalid procedure call or argument
error and the "Load Data_Input" is highlighted. I did change your
original code to change Data_Input.MultiPage1.Value = 1 to a Value of 2
to point at the 3rd page (Income).


If Not Application.Intersect _
(Target, Me.Range("B3:I3,K3,C12")) Is Nothing Then

Load Data_Input
Data_Input.MultiPage1.Value = 2
Data_Input.MultiPage1.Pages(2).MultiPage2.Value = 0
Data_Input.Show

End If


"Tom Ogilvy" wrote in message
...
Sub ShowForm()
Load Data_Input
Data_Input.MultiPage1.Value = 1
Data_Input.MultiPage1.Pages(1).MultiPage2.Value = 0
Data_Input.Show
End Sub

worked fine for me.

The second page of the Multipage1 was shown (Income) and on it, the
first page of the Multipage2 control was shown (January)

you can refer to a page with its name as shown here (from the immediate
window):
?
data_Input.Multipage1.Pages("Income").Multipage2.P ages("January").Caption
January

But you can't do something like this:
Data_Input.MultiPage1.Value = "Income"
Data_Input.MultiPage1.Pages("Income").MultiPage2.V alue = "January"
Data_Input.Show



--
Regards,
Tom Ogilvy

"Patrick Simonds" wrote in message
...
I have a UserForm on which I have placed a MultiPage control. The
MultiPage1 control has 4 pages (Data, Income, Outstanding and
Instructions). I use a variant of the code below to bring up the
UserForm with the proper page on the MultiPage control displayed, and it
works fine.

Now my problem is that on the Income page I have placed another
MultiPage control (MultiPage2 control) with 6 pages (one for each month
January - June) and I can not figure out how to alter the code below to
bring up one of the monthly pages on the MultiPage2 control. When I run
the code I get an Invalid procedure call or argument error and the line
"Data_Input.Show" is highlighted.



Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

If Not Application.Intersect _
(Target, Me.Range("B3:I3,K3")) Is Nothing Then
myMPPageName = "January"
Data_Input.Show

End If

End Sub













All times are GMT +1. The time now is 09:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com