Solved

Excel 2010 VBA combobox backcolor

Posted on 2011-03-18
4
1,535 Views
Last Modified: 2012-05-11
Since we have a lot more color choices in 2007 an 2010 - is it possible to use BackColor other than the ones that come up in the Color Palette? (56 colors)

I'm familiar with &HC0C0FF etc. I wonder is that extends to all the possible colors in Excel 2010 and how I would get that color code for any given color.

Is it possible to, and has someone have suggestions for a methodology for combining that with Styles?
Thanks
0
Comment
Question by:hindersaliva
  • 2
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
SeanStrickland earned 500 total points
ID: 35164636
Have you tried using RGB()?  It's RGB(red [0-255], green [0-255], blue [0-255]).  It lets you set your own red/green/blue value to create any color you want.

Example:
Me.ComboBox1.Backcolor = RGB(200,100,50)

Open in new window

0
 

Author Comment

by:hindersaliva
ID: 35164802
Perfect. So simple.
0
 

Author Comment

by:hindersaliva
ID: 35164818
Any further discussion/links on Excel 2010 VBA Styles strategies welcomed.
0
 
LVL 11

Expert Comment

by:SeanStrickland
ID: 35166050
Glad I could help.  Thanks for the grade.

Cheers,
Sean
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

910 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

21 Experts available now in Live!

Get 1:1 Help Now