Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default change label on multipage

I have a Userform with a Multipage on it. On the first page of the
Multipage I have a combobox. What I would like to do is based upon the
value of the combobox on the 1st page change the text of a label on
Page 2.

Is this possible, and if so how, I have tried to Code below but it does
not work.

If MultiPage1.Pages(0).cboTestType.Value = "Groove Weld" then
MultiPage1.Pages(1).lblWeldType.Caption = "Groove Weld"
else
MultiPage1.Pages(1).lblWeldType.Caption = "Fillet Weld"
End if

Regards
Martin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default change label on multipage

i just use the label name. thi label is on the 2nd page and depending on if the
checkbox next to it is checked, it dispaly as value

If Worksheets("work").Range("u2").Value = True Then
Me.CheckBox2 = True

With Me.Label2
.Caption = "Click to disable Menu load on startup."
.Height = 20
.Width = 80
.Left = 75
End With

GoTo Fin:

Else

Me.CheckBox2 = False
With Me.Label2
.Caption = "Click to load Menu on startup."
.Height = 20
.Width = 80
.Left = 75
End With
End If
Fin:

--


Gary


wrote in message
oups.com...
I have a Userform with a Multipage on it. On the first page of the
Multipage I have a combobox. What I would like to do is based upon the
value of the combobox on the 1st page change the text of a label on
Page 2.

Is this possible, and if so how, I have tried to Code below but it does
not work.

If MultiPage1.Pages(0).cboTestType.Value = "Groove Weld" then
MultiPage1.Pages(1).lblWeldType.Caption = "Groove Weld"
else
MultiPage1.Pages(1).lblWeldType.Caption = "Fillet Weld"
End if

Regards
Martin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default change label on multipage

Here is a generic example. You will need to change the object names as
needed.
This code belongs to your combobox_change event code.

Private Sub ComboBox1_Change()
If Me.ComboBox1.Value = "Groove Weld" Then
Me.Label1.Caption = "Groove Weld"
Else
Me.Label1.Caption = "Fillet Weld"
End If
End Sub

Mike F
wrote in message
oups.com...
I have a Userform with a Multipage on it. On the first page of the
Multipage I have a combobox. What I would like to do is based upon the
value of the combobox on the 1st page change the text of a label on
Page 2.

Is this possible, and if so how, I have tried to Code below but it does
not work.

If MultiPage1.Pages(0).cboTestType.Value = "Groove Weld" then
MultiPage1.Pages(1).lblWeldType.Caption = "Groove Weld"
else
MultiPage1.Pages(1).lblWeldType.Caption = "Fillet Weld"
End if

Regards
Martin



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default change label on multipage

your code worked fine for me:


Private Sub cboTestType_Click()
If MultiPage1.Pages(0).cboTestType.Value = "Groove Weld" Then
MultiPage1.Pages(1).lblWeldType.Caption = "Groove Weld"
Else
MultiPage1.Pages(1).lblWeldType.Caption = "Fillet Weld"
End If

End Sub

Private Sub UserForm_Initialize()
cboTestType.AddItem "Groove Weld"
cboTestType.AddItem "Fillet Weld"
End Sub


--
Regards,
Tom Ogilvy

wrote in message
oups.com...
I have a Userform with a Multipage on it. On the first page of the
Multipage I have a combobox. What I would like to do is based upon the
value of the combobox on the 1st page change the text of a label on
Page 2.

Is this possible, and if so how, I have tried to Code below but it does
not work.

If MultiPage1.Pages(0).cboTestType.Value = "Groove Weld" then
MultiPage1.Pages(1).lblWeldType.Caption = "Groove Weld"
else
MultiPage1.Pages(1).lblWeldType.Caption = "Fillet Weld"
End if

Regards
Martin



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 change CRASH! Drummer361 Excel Programming 0 August 21st 06 04:26 PM
change from page1 to page2 of MultiPage object BigDave[_27_] Excel Programming 1 November 21st 05 05:59 PM
Deactivating Multipage Change Event [email protected] Excel Programming 0 September 9th 04 03:13 AM
Deactivating Multipage Change Event [email protected] Excel Programming 2 September 9th 04 02:49 AM
Change the background color on a multipage control? Candee[_31_] Excel Programming 1 August 25th 04 10:08 PM


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