Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I am trying to create a combobox list from a dynamic range of cells using this code. I get no error, but my combox is empty.
In column V of worksheet ws_staff, I have values occupying V4:V11.
In column V of worksheet ws_staff, I have values occupying V4:V11.
Code:
'create combobox list
dim sed =as long
dim srng as range, cloc as range
sed = ws_staff.Cells(ws_staff.Rows.Count, "V").End(xlUp).Row
srng = ws_staff.Range("V4:V" & sed)
For Each cloc In srng
With Me.ComboBox1
.AddItem cloc.Value
End With
Next cloc