Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Header

Status
Not open for further replies.

CanonShooter

Structural
Oct 14, 2005
39
0
0
US
In VBA, a regular ole Combo Box control has a ColumnHeads property to display Column Headers (if you make it true).

Is there a way to put the text in the header? If you make this property true, it puts a blank row (no text) in there at the top.
 
Replies continue below

Recommended for you

Sorry, forgot to mention I wasn't "binding" the combo box data to anything in particular. It is more or less filled in insode the code, using AddItem.

So no Excel data to use. Does it have to get its data from "a table", to use the ColumnHeads property?
 
So, have the VBA create an invisible Excel spreadsheet to store headers. If this seems like a waste of resources for something as mundane as a header then use the sheet as an array variable as well (it comes pre dimensioned to 255 x 65536, three dimensional if you add extra worksheets), information stored on the sheet can be persistent from day to day.

The situation doesn't have to stink.

(Or change "invisible Excel spreadsheet" to "database" if you are more comfortable with databases)
 
Status
Not open for further replies.
Back
Top