Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multiform coding problem
I believe that I'm close but can't seem to get it right.
What I want to do is to control the visibility of ComboBox's and Labels on Multiforms. Am I close? cmbEDU is the name of the first ComboBox on the Multiform. I'm not sure if I need to note that this code is not on the Multiform itself. Private Sub cmbProdSeries_Change() cmbProduct.RowSource = "" cmbProduct.Text = "" Select Case cmbProdSeries.Text Case Is = "Experience Life" cmbProduct.RowSource = "inpELProducts" lblCDate.Caption = "Contract Effective Date" cmbClass.RowSource = "inpStatusLbD" MultiPage1.Pages("Page1").Item(cmdEDU).Visible = False ' MultiPage1.Pages("Page1").Item(lblEDU).Visible = False Case Is = "Life by Design" cmbProduct.RowSource = "inpLbDproducts" lblCDate.Caption = "Contract Application Date" cmbClass.RowSource = "inpStatusLbD" MultiPage1.Pages("Page1").Item(cmdEDU).Visible = True ' MultiPage1.Pages("Page1").Item(lblEDU).Visible = True Case Is = "New Series" cmbProduct.RowSource = "inpNEWproducts" lblCDate.Caption = "Contract Application Date" cmbClass.RowSource = "inpStatusLbD" MultiPage1.Pages("Page1").Item(cmdEDU).Visible = True ' MultiPage1.Pages("Page1").Item(lblEDU).Visible = True End Select End Sub -- Wag more, bark less |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multiform coding problem
Got it!!! Can this be simplified???
Private Sub cmbProdSeries_Change() cmbProduct.RowSource = "" cmbProduct.Text = "" Select Case cmbProdSeries.Text Case Is = "Experience Life" cmbProduct.RowSource = "inpELProducts" lblCDate.Caption = "Contract Effective Date" cmbClass.RowSource = "inpStatusLbD" MultiPage1.Pages("Page1").Item("cmbEDU").Visible = False MultiPage1.Pages("Page1").Item("lblEDU").Visible = False Case Is = "Life by Design" cmbProduct.RowSource = "inpLbDproducts" lblCDate.Caption = "Contract Application Date" cmbClass.RowSource = "inpStatusLbD" MultiPage1.Pages("Page1").Item("cmbEDU").Visible = True MultiPage1.Pages("Page1").Item("lblEDU").Visible = True Case Is = "New Series" cmbProduct.RowSource = "inpNEWproducts" lblCDate.Caption = "Contract Application Date" cmbClass.RowSource = "inpStatusLbD" MultiPage1.Pages("Page1").Item("cmbEDU").Visible = True MultiPage1.Pages("Page1").Item("lblEDU").Visible = True End Select End Sub "Brad" wrote: I believe that I'm close but can't seem to get it right. What I want to do is to control the visibility of ComboBox's and Labels on Multiforms. Am I close? cmbEDU is the name of the first ComboBox on the Multiform. I'm not sure if I need to note that this code is not on the Multiform itself. Private Sub cmbProdSeries_Change() cmbProduct.RowSource = "" cmbProduct.Text = "" Select Case cmbProdSeries.Text Case Is = "Experience Life" cmbProduct.RowSource = "inpELProducts" lblCDate.Caption = "Contract Effective Date" cmbClass.RowSource = "inpStatusLbD" MultiPage1.Pages("Page1").Item(cmdEDU).Visible = False ' MultiPage1.Pages("Page1").Item(lblEDU).Visible = False Case Is = "Life by Design" cmbProduct.RowSource = "inpLbDproducts" lblCDate.Caption = "Contract Application Date" cmbClass.RowSource = "inpStatusLbD" MultiPage1.Pages("Page1").Item(cmdEDU).Visible = True ' MultiPage1.Pages("Page1").Item(lblEDU).Visible = True Case Is = "New Series" cmbProduct.RowSource = "inpNEWproducts" lblCDate.Caption = "Contract Application Date" cmbClass.RowSource = "inpStatusLbD" MultiPage1.Pages("Page1").Item(cmdEDU).Visible = True ' MultiPage1.Pages("Page1").Item(lblEDU).Visible = True End Select End Sub -- Wag more, bark less |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with my coding problem? | Excel Worksheet Functions | |||
If, Then, Else Coding Problem | Excel Programming | |||
Multiform Tab Colours | Excel Programming | |||
problem with coding | Excel Programming | |||
Please help: Coding Problem | Excel Programming |