hide all comboboxes

  • Thread starter Thread starter sunilpatel
  • Start date Start date
S

sunilpatel

Hi

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

is this possible?

Thanks
 
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
 
Back
Top