G
Guest
What Collection are ComboBoxes objects of? So that they can be accessed to perfom a modification on each ComboBox in the application via a For Each Next loop?
perfom a modification on each ComboBox in the application via a For EachGeorge said:What Collection are ComboBoxes objects of? So that they can be accessed to
perfom a modification on each ComboBox in the application via a For EachGeorge said:What Collection are ComboBoxes objects of? So that they can be accessed to
with an Excel Worksheet, the OLE method would seem to be the most likely toGeorge said:Tom, Juan,
Thank you for your help. I have tried both methods, but as I am using it
Design mode, when I selected a ComboBox, the formula bar read:If TypeName(oleObj) = "ComboBox" Then
But it likewise ran through, but did not trigger a true response.
Dim oleObj As OLEObject, cboItem As MSForms.ComboBox
With Application.Workbooks(1).Worksheets(1)
For Each oleObj In .OLEObjects
If TypeOf oleObj Is MSForms.ComboBox Then
Set cboItem = oleObj
cboItem.ListIndex = -1
MsgBox "Arrived inside If block"
End If
Next oleObj
End With
Apparently, each ComboBox is not being recognized as a ComboBox, though in