Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default TabSritp & Multipage

Waht is the different between TabStrip and Multipage?. When do I know which
one to use?..
I have a form with two pages. Each page has label, Textbox, and OK button.
However, I do not know how to setup the code to allow the following:
1.- When click "Page 1" run the "macro 1"
1.- When click "Page 2" run the "macro 2"

Could you please help me with this code?

Thanks in advance.
Maperalia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default TabSritp & Multipage

Waht is the different between TabStrip and Multipage?. When do I know
which
one to use?..


A Multipage is a "container" object, like a Frame. You can place other
controls on each page and the control's parent is the multipage.

A Tab strip can be made to look like a MultiPage but placing other controls
on it merely places them over it, you can't have separate controls per tab
(though you might toggle their visibility depending on the selected tab).

I have a form with two pages. Each page has label, Textbox, and OK button.
However, I do not know how to setup the code to allow the following:
1.- When click "Page 1" run the "macro 1"
1.- When click "Page 2" run the "macro 2"


Put a MultiPage and a Tabstrip on a userform

Private Sub MultiPage1_Change()
With MultiPage1
Me.Caption = .Value & " " & .Pages(.Value).Name
End With
End Sub

Private Sub TabStrip1_Change()
With TabStrip1
Me.Caption = .Value & " " & .Tabs(.Value).Name
End With
End Sub

Regards,
Peter T


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default TabSritp & Multipage

Peter;
Thanks for your quick response.
According to the information you just gave me. Mlutipages is the more
suitable for me. I copied the code to use this form. Correct me if I wrong, I
understood that since I have two pages I will use the following:

'###Start of 1st Page ###################
Private Sub MultiPage1_Change()
With MultiPage1
Me.Caption = .Value & " " & .Pages(.Value).Name
End With
End Sub
'#### End of 1st Page ###################

'### Start of 2nd Page ###################
Private Sub MultiPage2_Change()
With MultiPage1
Me.Caption = .Value & " " & .Pages(.Value).Name
End With
End Sub
'#### End of 2nd Page ##################


In addition, could yiou please tell me what statement I need to write in my
module to recognize this form?

Thanks.
Maperalia










"Peter T" wrote:

Waht is the different between TabStrip and Multipage?. When do I know
which
one to use?..


A Multipage is a "container" object, like a Frame. You can place other
controls on each page and the control's parent is the multipage.

A Tab strip can be made to look like a MultiPage but placing other controls
on it merely places them over it, you can't have separate controls per tab
(though you might toggle their visibility depending on the selected tab).

I have a form with two pages. Each page has label, Textbox, and OK button.
However, I do not know how to setup the code to allow the following:
1.- When click "Page 1" run the "macro 1"
1.- When click "Page 2" run the "macro 2"


Put a MultiPage and a Tabstrip on a userform

Private Sub MultiPage1_Change()
With MultiPage1
Me.Caption = .Value & " " & .Pages(.Value).Name
End With
End Sub

Private Sub TabStrip1_Change()
With TabStrip1
Me.Caption = .Value & " " & .Tabs(.Value).Name
End With
End Sub

Regards,
Peter T



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

I guess(?) you mean you have one Multipage control, named "MultiPage1",
which has two pages. Your concept is wrong, you trap events for the entire
MultiPage, not individual pages. The code I gave you will tell you which
page the user has selected, if indeed you actually need to know that. So

Note the current page is indicated by the MultiPage's Value property, the
first page has value 0, the second page is 1, etc

Normally you will place additional controls on each page and trap their
events as needed.

In addition, could yiou please tell me what statement I need to write in
my
module to recognize this form?


I don't follow this, what do you want to "recognize", where from and when.

Regards,
Peter T


"Maperalia" wrote in message
...
Peter;
Thanks for your quick response.
According to the information you just gave me. Mlutipages is the more
suitable for me. I copied the code to use this form. Correct me if I
wrong, I
understood that since I have two pages I will use the following:

'###Start of 1st Page ###################
Private Sub MultiPage1_Change()
With MultiPage1
Me.Caption = .Value & " " & .Pages(.Value).Name
End With
End Sub
'#### End of 1st Page ###################

'### Start of 2nd Page ###################
Private Sub MultiPage2_Change()
With MultiPage1
Me.Caption = .Value & " " & .Pages(.Value).Name
End With
End Sub
'#### End of 2nd Page ##################


In addition, could yiou please tell me what statement I need to write in
my
module to recognize this form?

Thanks.
Maperalia










"Peter T" wrote:

Waht is the different between TabStrip and Multipage?. When do I know
which
one to use?..


A Multipage is a "container" object, like a Frame. You can place other
controls on each page and the control's parent is the multipage.

A Tab strip can be made to look like a MultiPage but placing other
controls
on it merely places them over it, you can't have separate controls per
tab
(though you might toggle their visibility depending on the selected tab).

I have a form with two pages. Each page has label, Textbox, and OK
button.
However, I do not know how to setup the code to allow the following:
1.- When click "Page 1" run the "macro 1"
1.- When click "Page 2" run the "macro 2"


Put a MultiPage and a Tabstrip on a userform

Private Sub MultiPage1_Change()
With MultiPage1
Me.Caption = .Value & " " & .Pages(.Value).Name
End With
End Sub

Private Sub TabStrip1_Change()
With TabStrip1
Me.Caption = .Value & " " & .Tabs(.Value).Name
End With
End Sub

Regards,
Peter T





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 tab JWM6[_5_] Excel Programming 4 April 22nd 06 02:06 AM
MultiPage Bill[_30_] Excel Programming 1 January 13th 06 08:22 PM
vba - using multipage ajliaks[_23_] Excel Programming 3 August 9th 04 01:29 PM
MultiPage Michael[_25_] Excel Programming 3 January 6th 04 12:49 PM
Multipage Paul Excel Programming 1 July 9th 03 02:34 PM


All times are GMT +1. The time now is 04:42 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"