sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I have a Combobox on a Userform named ComboUser - It is populated from values in range L12:L50 like this;
What I need is for when it changes to populate another Combobox with the value from the same row but in column N. I need this to occur whenever ComboUser is changed and without the need for the press of a button.
The values in column L can be a mixture of text and numbers, text only or numbers only if this makes any difference.
Code:
Dim c As Range
ComboUser.Clear
With Worksheets("Setup")
For Each c In .Range(.Range("L12"), .Range("L" & .Rows.Count).End(xlUp))
If c.Value <> vbNullString Then ComboUser.AddItem c.Value
Next c
End With
What I need is for when it changes to populate another Combobox with the value from the same row but in column N. I need this to occur whenever ComboUser is changed and without the need for the press of a button.
The values in column L can be a mixture of text and numbers, text only or numbers only if this makes any difference.