Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2014-02-08
2
1,206 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 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39843955
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
ID: 39843974
Many thanks for that.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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