craig.penny
Well-known Member
- Joined
- May 8, 2009
- Messages
- 656
Hi all,
I have a userform with several ComboBoxes. When I click a Command Button, I'd like to clear them all out.
This is the code that goes with the Command Button:
As you can guess this doesn't work...
I've tried the variations that I can think of but I'd bet I'm missing the bigger picture on this.
Can someone give me an example of how to loop through all the ComboBoxes on the form?
Thanks in advance!!!
I have a userform with several ComboBoxes. When I click a Command Button, I'd like to clear them all out.
This is the code that goes with the Command Button:
Code:
Private Sub ClearCmndB_Click()
Dim CB As ComboBox
For Each CB In Me.ComboBoxes
CB.Clear
Next CB
End Sub
As you can guess this doesn't work...
I've tried the variations that I can think of but I'd bet I'm missing the bigger picture on this.
Can someone give me an example of how to loop through all the ComboBoxes on the form?
Thanks in advance!!!