Kirkeous
asked on
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,
Kirk
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,
Kirk
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.
ASKER
Thanks, but you can still see the "down arrow". Is there a way just to make it invisible?
ASKER
I tried this:
ActiveSheet.Shapes("ComboB ox1").Visi ble = False
And I get a run-time error (a lot of numbers!) and it says"
"The item with the specified name wasn't found
ActiveSheet.Shapes("ComboB
And I get a run-time error (a lot of numbers!) and it says"
"The item with the specified name wasn't found
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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)
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("Co mboBox1")
cb.Visible = False
Or less code:
Activesheet.OLEObjects("Co mboBox1"). Visible = False
Dim cb As OLEObject
Set cb = ActiveSheet.OLEObjects("Co
cb.Visible = False
Or less code:
Activesheet.OLEObjects("Co
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.
ASKER
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?
ASKER
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.
Kirkeous
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.
Kirkeous