sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I've got this which loads a series of Comboboxes on a Userform;
I need each Combobox to be effectively reloaded as each of the others change, (because as a value is selected in the Combobox it updates the relevant column with 'Yes').
I've tried adding the following;
before the .AddItem part but all that does it clear every item except the last used row.
Can anyone suggest a simple workaround?
Code:
Lastrow = Sheet5.Range("J43").End(xlUp).Row + 1
For Each cell In Sheet5.Range("J2:J" & Lastrow)
If cell.Value = "No" Then
For i = 1 To 24
Me.Controls("ComboStaff" & i).AddItem cell.Offset(0, -3).Value
Next
End If
Next
I need each Combobox to be effectively reloaded as each of the others change, (because as a value is selected in the Combobox it updates the relevant column with 'Yes').
I've tried adding the following;
Code:
Me.Controls("ComboStaff" & i).Clear
before the .AddItem part but all that does it clear every item except the last used row.
Can anyone suggest a simple workaround?