djburnheim
Technical User
I'm trying to fill multiple comboboxes in a worksheet with the same items but am running into troubles. I've been able to do it if the comboboxes are in a userform but can not work the code when they are in a sheet. This is what I have so far.
***code***
Sub Macro1()
Dim ctrl As Control
For Each ctrl In Sheets(1)
If TypeName(ctrl) = "ComboBox" Then
ctrl.AddItem = "Yes"
ctrl.AddItem = "No"
End If
Next ctrl
End Sub
***end code***
Any suggestions?
Thanks in advance
Dave
***code***
Sub Macro1()
Dim ctrl As Control
For Each ctrl In Sheets(1)
If TypeName(ctrl) = "ComboBox" Then
ctrl.AddItem = "Yes"
ctrl.AddItem = "No"
End If
Next ctrl
End Sub
***end code***
Any suggestions?
Thanks in advance
Dave