Hi
I have 2 comboboxs in a userform
box2 = Part no. & box1= Op No.
op no is based on part no., the code below does work....however
if the form is opened on a page that is not the source of the named ranges the rowsource only reflects the actual range of the named range
i.e A6:A36 it does not know what page the info is on.
if i manualy type in = NQF005025 in the rowsource it workes
Private Sub ComboBox2_Change()
ComboBox1.Value = "" ' value empty by default
'changes the rowsource data(named range)of combobox1 based on the text selected in combobox2
ComboBox1.RowSource = ActiveWorkbook.Names(ComboBox2.Value).RefersToRange.Address
End Sub
Bernie
I have 2 comboboxs in a userform
box2 = Part no. & box1= Op No.
op no is based on part no., the code below does work....however
if the form is opened on a page that is not the source of the named ranges the rowsource only reflects the actual range of the named range
i.e A6:A36 it does not know what page the info is on.
if i manualy type in = NQF005025 in the rowsource it workes
Private Sub ComboBox2_Change()
ComboBox1.Value = "" ' value empty by default
'changes the rowsource data(named range)of combobox1 based on the text selected in combobox2
ComboBox1.RowSource = ActiveWorkbook.Names(ComboBox2.Value).RefersToRange.Address
End Sub
Bernie