Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Excel combo boxes - font size

Status
Not open for further replies.

DuckBill

MIS
Jun 19, 2001
19
0
0
GB
I have an Excel spreadsheet which uses combo boxes. The default font size used for the items displayed in the drop down list in the boxes is currently too small and I cannot find any way of changing it. Unlike other controls, there is no "Font" tab in the "properties" form.

Can anyone help please?

Thanks,

DuckBill
 
Hi

Which version of Excel are you using ? And where is your Combo Box located ?

Ram P
 
I am using Excel 2000 and the Combo Box is located on a worksheet (not on a form).

DuckBill
 
Hi Duckbill

Did you create you combo from the 'Controls Toolbox' or the 'Forms' toolbar

If it's the latter you don't have the same properties (I'm not saying this right, but you'll see what I mean)

Bring up the Control Toolbox, in the same way you would show any other toolbar, and create a combo (or any other control)
While in design mode and with the control selected click the properties button on the toolbar. Font is available there.

Don't ask me to explain the gdifference between the two sets of controls coz I don't really know!!

;-) If a man says something and there are no women there to hear him, is he still wrong?
 
Loomah - not 100% sure myself but I believe it is something to do with OLE Automation and activeX controls. I believe that Forms controls are ActiveX and Controls Toolbox controls are not. as to what difference this makes (apart from the lack of properties in the Forms controls) I don't know but would hazard a guess that Forms controls are more easily accessible to use from other M$ products and VB (as opposed to VBA) HTH
~Geoff~
[lightsaber]
 
The
Code:
Forms
toolbar is an Excel 5/95 feature which is still supported. The
Code:
Control
toolbox utilize the ActiveX controls.

There are some benefits/ disadvantages to both, eg ActiveX event procedures must be placed in the relevant class module, whereas a form control event procedure can be put in a standard module.
 
Thanks for all the responses; all very interesting and useful.

I have now replaced my Forms-created Combo Box with a Control Toolbox-created one and have been able to change the font to a better size. I did need to reconfigure some other things, however, as the new Combo Box seems to only return a value from the list, whereas the old Forms-created one returned a list index; that wasn't too hard to sort out though.

Thanks again,

DuckBill
 
Sorry to keep extending this thread but......
Bryan - your response is what I initially thought but I went and checked VBA help and it seemed to suggest otherwise (ie vice versa)

:

You use an OLE programmatic identifier (sometimes called a ProgID) to create an Automation object. Use one of the following OLE programmatic identifiers to create an ActiveX control.

Use this identifier To create this object
Forms.CheckBox.1 CheckBox
Forms.ComboBox.1 ComboBox
Forms.CommandButton.1 CommandButton
Forms.Frame.1 Frame
Forms.Image.1 Image
Forms.Label.1 Label
Forms.ListBox.1 ListBox
Forms.MultiPage.1 MultiPage
Forms.OptionButton.1 OptionButton
Forms.ScrollBar.1 ScrollBar
Forms.SpinButton.1 SpinButton
Forms.TabStrip.1 TabStrip
Forms.TextBox.1 TextBox
Forms.ToggleButton.1 ToggleButton

me confused.......[ponder]
HTH
~Geoff~
[noevil]
 
Very strange Geoff. Mind you, Excel VBA files aren't the best, are they? Just had a look in the files and I can't even find anything on the differences between the two types - quelle surprise.

I could've sworn that was what the case was.

Not sure what you're trying to say about the programmatic identifiers either? Are you confused about teh controls being accessed via the Forms object? As far as I know, forms controls have Dialog as a parent, whereas with ActiveX it's UserForm. Forms would just seem to be a quirk of convention. Does this help, or have I got the wrong end of teh stick?
 
My point was that the snippet of help file I pasted in seems to be saying that:
This is how you make an activeX object
Forms.CheckBox.1

I have to say, I thought that controls toolbox controls were activeX cuz they're built around the standard vba environment - maybe this is how to make non-activeX controls, activeX.....?????

still confused....but then again, I work with excel - why am i surprised ;-) HTH
~Geoff~
[noevil]
 
As I say, "Forms" must just be a quirk of convention. I'd never created ActiveX controls programmatically, hence my confusion.

You'd have thought that
Code:
UserForms.CheckBox.1
would have been the way to do it, since ActiveX controls are members of the UserForm object.

Forms is just a poorly chosen object name I guess.

But, as you say, if it's too easy then it can't be Excel!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top