Solved

Excel 2010 VBA combobox backcolor

Posted on 2011-03-18
4
1,516 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Excel and Formulas 8 31
Calculate days between two dates 7 38
integer8 values 1 10
Formula to copy cell and its "format" 3 26
What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

758 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

18 Experts available now in Live!

Get 1:1 Help Now