If you go into design mode, and right click on that combobox (from the control
toolbox toolbar), you'll see a property called .forecolor. There's also a .font
property you can access.
You can change it with something like:
Option Explicit
Private Sub ComboBox1_Change()
Dim myColor As Long
Dim myBold As Boolean
With Me.ComboBox1
Select Case .ListIndex
Case Is = 0: myColor = RGB(255, 0, 0)
myBold = False
Case Is = 1: myColor = RGB(0, 255, 0)
myBold = True
Case Is = 2: myColor = RGB(0, 0, 255)
myBold = True
Case Else
myColor = RGB(0, 0, 0)
myBold = False
End Select
.ForeColor = myColor
.Font.Bold = myBold
End With
End Sub
This does change the colors/font in the dropdown, too.
"robert inman via OfficeKB.com" wrote:
Is it possible,when selecting an item from a combo box list, which is
linked to another sheet,to have the font color or style change,depending
on the selection?
--
Dave Peterson
|