Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,566
- Office Version
- 365
- 2016
- Platform
- Windows
Please consider this following simple code:
When the user changes the value in the combobox (uf1cbx1_operatorini) on my form, it triggers an event to populate the label (uf1lbl1_name) within the same userform.
I am getting an error with the line in red.
uf1rng_staff is a named range referring to a range in the workbook, sheet2!O32:P42. The values available in my combobox are all listed in cells O32:O42.
Am I using this parameter wrong by referring to a named range?
Rich (BB code):
Private Sub uf1cbx1_operatorini_Change()
'populate uf1lbl1_name
uf1lbl1_name = Application.WorksheetFunction.VLookup(uf1cbx1_operatorini.Value, ufrng1_staff, 2, False)
End Sub
When the user changes the value in the combobox (uf1cbx1_operatorini) on my form, it triggers an event to populate the label (uf1lbl1_name) within the same userform.
I am getting an error with the line in red.
uf1rng_staff is a named range referring to a range in the workbook, sheet2!O32:P42. The values available in my combobox are all listed in cells O32:O42.
Am I using this parameter wrong by referring to a named range?