ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Hi,
Userform with 4 comboboxes.
I dont wish to type the same thing 4 times so im trying to make things easier.
Having said that my attempt keeps saying compile error.
It could be that its just wrong or a mistake spotted ?
Please advise thanks
Userform with 4 comboboxes.
I dont wish to type the same thing 4 times so im trying to make things easier.
Having said that my attempt keeps saying compile error.
It could be that its just wrong or a mistake spotted ?
Please advise thanks
Rich (BB code):
Private Sub UserForm_Initialize()
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeName(ctrl) = "Combobox" Then
LoadComboBox ctrl.Name
End If
Next
ComboBox1.AddItem "A"
ComboBox1.AddItem "B"
ComboBox1.AddItem "C"
ComboBox1.AddItem "D"
End Sub