?
Solved

Excel 2010 VBA combobox backcolor

Posted on 2011-03-18
4
Medium Priority
?
1,640 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
[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
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
SeanStrickland earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

743 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