Hi all
I have a simple userform (CustomerByProduct), where the user must make a selection from the 1st Combobox (cmdProductFamily, with the idea being that this choice then determines the options shown in the 2nd Combobox (cmdProductName). The choice from the 1st relates to a named range of the same name. However, I can't get the 2nd Combobox list to populate with the code i'm using, and I can't work out where i'm going wrong...
I also tried it the other way around, and that didn't help...
The RowSource property box for the 2nd Combobox is blank.
I'm a relative noob, so its sure to be a simple error, but any help greatly appreciated!
I have a simple userform (CustomerByProduct), where the user must make a selection from the 1st Combobox (cmdProductFamily, with the idea being that this choice then determines the options shown in the 2nd Combobox (cmdProductName). The choice from the 1st relates to a named range of the same name. However, I can't get the 2nd Combobox list to populate with the code i'm using, and I can't work out where i'm going wrong...
Code:
Option Explicit
Private Sub cmdProductFamily_Change()
If Me.cmdProductFamily.Value = "AA" Then Me.cmdProductName.RowSource = "AA"
If Me.cmdProductFamily.Value = "BB" Then Me.cmdProductName.RowSource = "BB"
End Sub
Sub ShowDialogBox()
CustomerByProduct.Show
End Sub
I also tried it the other way around, and that didn't help...
Code:
Option Explicit
Private Sub cmdProductName_Change()
If Me.cmdProductFamily.Value = "AA" Then Me.cmdProductName.RowSource = "AA"
If Me.cmdProductFamily.Value = "BB" Then Me.cmdProductName.RowSource = "BB"
End Sub
Sub ShowDialogBox()
CustomerByProduct.Show
End Sub
The RowSource property box for the 2nd Combobox is blank.
I'm a relative noob, so its sure to be a simple error, but any help greatly appreciated!