hide all comboboxes

S

sunilpatel

Hi

i would like to hide all comboboxes on a particular sheet without knowing
all their names

is this possible?

Thanks
 
D

Dave Peterson

Option Explicit
Sub testme()
Dim OLEObj As OLEObject
For Each OLEObj In ActiveSheet.OLEObjects
If TypeOf OLEObj.Object Is MSForms.ComboBox Then
OLEObj.Visible = False
End If
Next OLEObj
End Sub
 
Top