|
-
Jan 22nd, 2010, 06:25 PM
#5
Thread Starter
Hyperactive Member
Re: Excel Automation - Change color pallette
Thanks very much si the geek and Spoo.
I had tried a lot of what I thought were sensible adaptations of the ColorIndex default palette approach by amending the VBA code, but without success - hence this post.
I have found the answer I needed in the Spoo response. In retrospect it seems so simple, but I was distracted from trying such a code by reading that Excel "has to use just those 56 ColorIndex values".
It does not. The Spoo approach allows "normal" VB6 RGB specifications for colour in Excel automation. In all probability the Spoo method would also work with Hexadecimal colour specification - but my preference is to work in RGB.
(The background to this post was that I wanted to print a small Excel file created by code in VB6. I wanted the cell background colours to show, but not too vividly such that on certain printers it became difficult to read the text against the background. Therefore I had need to shade the backgrounds more a more subtle way than the default 56 colour Excel palette seems to allow.)
Great solution thanks Spoo. Maybe a worthwhile addition to your Excel automation tutorial at next update si?
Thread to be marked closed.
camoore
Wales, UK
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|