MS Excel 2003: How do I make Combo Box Invisible?

Dear Guru -

How do I make a ComboBox invisible? I just want that shape to be invisible. It is called ComboBox1 on Sheet18.

I keep getting Run Time Error 1004. OLEClass not defined.

Many Thanks,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TracyVBA DeveloperCommented:
If what you're talking about having the shape invisible, right click on the combo box and click properties.  Then for BorderStyle set it to 1 - frmBorderStyleSingle.  Then for BorderColor, click the drop down and select Window Background.
KirkeousAuthor Commented:
Thanks, but you can still see the "down arrow". Is there a way just to make it invisible?
KirkeousAuthor Commented:
I tried this:

 ActiveSheet.Shapes("ComboBox1").Visible = False

And I get a run-time error (a lot of numbers!) and it says"

"The item with the specified name wasn't found
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

KirkeousAuthor Commented:
Sub HideComboBox()

'Hide the combobox in a range

Dim GetShape As Shape

'Activate sheet to delete autoshapes.

With Worksheets("Dashboard")
    For Each GetShape In ActiveSheet.Shapes
       If Not Application.Intersect(GetShape.TopLeftCell, .Range("I1:K2")) Is Nothing Then
         GetShape.Visible = msoTrue
       End If

End With

End Sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Do this:
In VBE double click the sheet that has the combobox on it.
Paste this in it:
Public Sub hideCB()
ComboBox1.Visible = False
End Sub
Now in your other modules use this:
Call Sheet1.hideCB

'or whatever the sheet module is called, I used sheet1 (could be sheet2, sheet3, mysheet, etc)
or you could just use this:
Dim cb As OLEObject
Set cb = ActiveSheet.OLEObjects("ComboBox1")
cb.Visible = False
Or less code:
Activesheet.OLEObjects("ComboBox1").Visible = False
I would like the author to explain how the responses to this inquiry didn't help them as my response, and maybe the others before, provided a proven solution.
KirkeousAuthor Commented:
Because I figured it out on my own! But thanks always to the great minds here!
Would you please share your solution and how it differed from the one's posted above?
KirkeousAuthor Commented:
MWGainesJR -

First, thank you very much for posting a solution; however, if you look at the time I had already closed this out before you posted a solution!

Thanks very much.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.