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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top