LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Trouble setting background color of Worksheet

I'm trying to set the background color for the entire worksheet. If there's
a quicker way to do this, other than by grabbing a reasonably large range,
then please let me know and I'll use that approach:

Here's the approach I am attempting:

TargetWorksheet.Range("A1:AZ1024").Interior.Color =
SourceWorksheet.Cells(1, 1).Interior.Color

What I'm doing is setting the color of the target worksheet to the color of
the source worksheet. The color I expect is:

C1 9B 7C or 12688251 - a nice pale blue.

I've verified that SourceWorksheet.Cells(1, 1).Interior.Color does in fact
evaluate to 12688251, but what I'm actually seeing is light grey, rather
than pale blue. Even if I try this using the desired value as a literal
constant, I still get the light grey. I know the code statement is doing
something, since without it the target worksheet shows up white and a
literal constant of 0 gives me a black backgound, &HFF00FF gives me bright
lavender, but for some reason, C19B7C (12688251) gives me light grey, even
though in the source worksheet is shows nicely as pale blue.

What am I doing wrong?

Thanks!

- Joseph Geretz -



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Setting background color in XLM Excel worksheets in Netscapeand Firefox browsers udarrell Excel Programming 1 March 8th 06 01:38 PM
Setting Background Color RGB (Always goes to closest index color) [email protected] Excel Programming 6 December 2nd 05 11:47 PM
Conditionally setting background color of a cell Scott Steiner Excel Discussion (Misc queries) 1 November 20th 05 12:11 PM
worksheet background color Mominator Excel Discussion (Misc queries) 5 March 12th 05 02:05 PM
Setting cell background color based on value Erik[_5_] Excel Programming 3 February 25th 04 10:56 PM


All times are GMT +1. The time now is 10:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"