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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com