Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a combo box and it is linked to a cell a2.
When I select a value from the combo box drop down list this obviously changes the value in cell A2. Is it possible to have the background of the como box automatically change colour depending on the value of cell a2? e.g. Cell A2 = 1, combo box background = red Cell A2 = 2, combo box background = green Cell A2 = 3, combo box background = blue Thanks for any help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this in the combobox_change event code:
Private Sub ComboBox1_Change() If Range("A2").Value = 1 Then Me.ComboBox1.BackColor = RGB(255, 0, 0) If Range("A2").Value = 2 Then Me.ComboBox1.BackColor = RGB(0, 255, 0) If Range("A2").Value = 3 Then Me.ComboBox1.BackColor = RGB(0, 0, 255) End Sub Mike F "John Davies" wrote in message ... I have a combo box and it is linked to a cell a2. When I select a value from the combo box drop down list this obviously changes the value in cell A2. Is it possible to have the background of the como box automatically change colour depending on the value of cell a2? e.g. Cell A2 = 1, combo box background = red Cell A2 = 2, combo box background = green Cell A2 = 3, combo box background = blue Thanks for any help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change a cell background colour to my own RGB colour requirements | Excel Discussion (Misc queries) | |||
excel and background colour | Setting up and Configuration of Excel | |||
excel and no background colour | Excel Discussion (Misc queries) | |||
Background colour using VB | Excel Programming | |||
Background colour using VB | Excel Programming |