Can Combo Boxes Be Formatted?

  • Thread starter Thread starter J Tulk
  • Start date Start date
J

J Tulk

Is there any way to format the contents of a combo box? I
am using EXCEL 97. The format of the list has no effect
on the format in the combo box. The combo box doesn't
seem to have any properties except size.
 
Hi,

YOu can use the format function for example lets say your list contains
dates then use the format in the change event for the combobox

Private Sub ComboBox1_Change()

ComboBox1.Value = Format(ComboBox1.Value, "mm/dd/yy")

End Sub





Cesar Zapata
 
Correct . You need to format any text, dates or numbers before you add them
to the combo or list box
 
My experience is that a combobox picks up the original data format if you
use the fill range attribute of the combo.

If you are adding the items from the worksheet one at a time, that needs
formatting.

Which are you doing, and what is the format being lost?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
The formatting I'm trying to do is to make the contents of
the box have a higher point size (font size = 18 to 30)
and to be bold. I tried variations on the code you show
below but I'm not good enough to figure out thewording
that is needed.
 
You can't do this with a forms combobox, you can with a control toolbox
combobox which has a font property.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
I had a list of three names in a worksheet
called "Title". I added a combo box that I copied from
another sheet I created about two years ago. I brought up
the "Format Control" by right clicking the combo box. In
the "Format Control" I click on the "Control" tab. In the
control tab I entered the "Input Range", "Cell Link"
and "Drop Down Lines". The names in the list were
formated to Arial, bold and 12 point. The names come up
in the box at what looks like Arial, regular and 9 point.
 
I figured the gist of this out from your other reply. As I said, if you want
to change the font, you need control toolbox combos.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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

Similar Threads

Combo Box format 0
combo box 2
Combo Box question 5
MS Access problem 0
Having trouble with combo boxes. 11
Disabling the Combo Box 6
resizing a Combo Box 3
Combo box in user form 5

Back
Top