MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Changing Color of Text in Pull-Down Combo Boxes

Posted by Jeff Borek on June 20, 2000 6:35 AM

I want to "grey" certain items on a spreadsheet when they're not applicable.
This works fine for regular cells put I can't seem to change the color of the text in combo boxes, even if I change the color in the source cells.
Alternatively I could hide the rows with the combo boxes but some of the time the boxes don't always get hidden along with the rest of the row.

Any thoughts?

Posted by Ryan on June 20, 0100 9:23 AM

You could try reloading the combo box whenever something is changed and do code it so it skips the cells whose background color is gray (15). Here's an example:

If Range("A1").Interior.Color = 15 Then
cmbComboBox1.AddItem Range("A1").Value
End If

Loop this through your selection and you get the results that you want, I hope. I don't know of any way to change the color of the text inside of the combobox. Hope this helps

Posted by Ivan Moala on June 20, 0100 8:20 PM

The combobox avail via the Forms commandbar offers
very little in the way of the objects properties
and method eg color. Instead, try using the combobox avail from the Control toolbox. These are
activex controls and offer you more in the way of prgming. eg ComboBox1.BackColor = &HC0C0C0 changes
the background color to a shade of grey. You will have
to experiment to get what you want.