Solved

Excel 2010 VBA combobox backcolor

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

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

713 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