by Allen Wyatt
(last updated June 27, 2014)
Jerri is trying to reference rather simple colors in a macro. In older versions of Excel the color references were understandable, but she's having problems with colors since the introduction of themes. If she records a macro, she gets references to various properties, such as Pattern, PatternColorIndex, TintAndShade, PatternTintAndShade, and ThemeColor. Jerri can't make sense of these and wonders if there is a good reference available that provides the background information she needs to work with colors in a macro.
You aren't alone, Jerri. The new color schemes introduced in Excel 2007 seem to baffle many people. The simple approach to colors used in older versions of Excel is gone, and the new approach doesn't seem to have any humanly discernable rhyme or reason. Doing simple searches at Microsoft doesn't turn up any helpful information. For instance, a search of Microsoft online support for PatternTintAndShade (which should get right to the heart of the matter) returns nothing—and this is three years after Excel 2007 was released! A wider search for the same word, looking at all of Microsoft.com, returns something only marginally more useful; it returns a page that describes the PatternTintAndShade property as a property that "returns or sets a tint and shade pattern." The reaction that comes to mind is "well, duh!"
In searching around the web there are lots of questions that crop up very similar to yours and precious few answers. There was one site that has a bit of useful information and is well worth reading:
Sorry about the long URL; you'll want to make sure you get it all. Perhaps, as time goes on, more information will come available.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7883) applies to Microsoft Excel 2007.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
The undo list can be a lifesaver when working in a macro. Unfortunately, the undo list is not preserved when you run a ...Discover More
When you need to stop a macro while it is running, you normally press Ctrl+Break. What are you to do if the keypress ...Discover More
You can create macros that are automatically executed whenever certain events occur within a worksheet. This tip details ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.