Code COMBOBOX value

jakobt

Active Member
Joined
May 31, 2010
Messages
337
I have a form with an combobox called status with 3 values Completed, WIP or OPEN.
Is it possible to write a piece of code so if the value is completed the combobox turns green, if the value is WIP yellow and ind OPEN Green.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Maybe something like this
VBA Code:
Private Sub Status_Change()
    With Status
        Select Case Status.Value
            Case "Completed"
                .BackColor = vbGreen
            Case "WIP"
                .BackColor = vbYellow
            Case "Open"
                .BackColor = vbRed
        End Select
    End With
End Sub
 
Upvote 0
I have a form with an combobox called status with 3 values Completed, WIP or OPEN.
Is it possible to write a piece of code so if the value is completed the combobox turns green, if the value is WIP yellow and ind OPEN Green.
If only 3, you could use Conditional Formatting as well.
More permutations could be added via VBA.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,399
Members
448,957
Latest member
Hat4Life

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
Back
Top