Solved

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

Posted on 2014-02-08
2
1,305 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
[X]
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
2 Comments
 
LVL 51

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

688 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