Colored List Boxes

pweigel

New Member
Joined
Jan 22, 2005
Messages
3
I am trying to create a list box with selections that are colors, not text. When the users select the color, it then will input that color into the cell. I've tried in a data validation range combined with conditional formatting(with no success) and with an active x control list box. The problem is, I have't figured out the how to use the active x listbox, so all it will do is select the whole thing at once, not the individual item. HELP!

PW
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,456
I don't know of a way to make a list box show the actual colors as the list items (is that what your asking?) but you can list the colors as text, and then have the cell changed to the color chosen through code.
Would that serve your purposes?

Dan
 

vconfused

Well-known Member
Joined
Jun 11, 2004
Messages
547
The problem is, I have't figured out the how to use the active x listbox, so all it will do is select the whole thing at once, not the individual item. HELP!

Sounds like you are in Design Mode. When using ActiveX controls, to make changes to them you need to be in Design Mode. On the Control Toolbox Toolbar, where the ActiveX Controls are, there is an "Exit Design Mode" button that converts to a "Design Mode" button depending on your current mode. The button has a triangle, pencil, and a ruler.

Hope this helps,
Nick
 

pweigel

New Member
Joined
Jan 22, 2005
Messages
3
I already have the data validation with conditional formatting working, but only plain text appears in the list box. I have the active x functioning now (Thanks Nick!), but I can't get the backcolors of each selection to change.
 

pweigel

New Member
Joined
Jan 22, 2005
Messages
3
Worst case, I would even settle for the color of the text to change with each selection (there is only three - red, yellow and green).

PW
 

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,456
What is it exactly that you're trying to change the BackColor of? Is it a cell on the sheet? Or is it the BackColor of the selection in the ActiveX control? And are you wanting it to change after the selection, or do you want the user to see different colored backgrounds for each color before they make their choice? (As far as I know you can only have one BackColor per control at any given time.)

If it's the control you want to change, and the change is to happen upon selection, then you may be better off using a ComboBox rather than a ListBox. Even then I believe you're going to need some code to change the color(s)
 

Forum statistics

Threads
1,148,047
Messages
5,744,493
Members
423,880
Latest member
CRE_finance_guy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top