Solved

How do I change the text colour in an Excel combo box with VBA ?

Posted on 2014-02-08
2
1,073 Views
Last Modified: 2014-02-08
Hi All,

I have a combo box on my Excel User form (called coCategory) and, depending on the value in another form field (coStatus), I want to change the colour of the text.

Here's my current code which doesn't work !!

   If Me.Controls("coStatus").Value <> "Completed" Then
      coCategory.Font.Color = vbRed
   End If

What do I need to correct to get it to work ?

Thanks
Toco
0
Comment
Question by:Tocogroup
2 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
Hi,

pls try

   If Me.Controls("coStatus").Value <> "Completed" Then
      coCategory.ForeColor = vbRed
   End If

Open in new window

Regards
0
 

Author Closing Comment

by:Tocogroup
Comment Utility
Many thanks for that.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now