Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
kdw kdw is offline
external usenet poster
 
Posts: 13
Default Why cell colors change when copying/moving

I have a sheet with data where the headers are colored gray and a few other
cells highlighted. I am using VB to make a copy of this sheet into a new
workbook, but all the colors change to an awful bright green and red in the
new sheet. Why is this? I am only doing a straight copy ( or move) of the
new sheet.

I tried doing the copy manually (i.e. Copy, Paste.). Same thing happened.
But the colors are fine when I copy it into another sheet _within_ the
original workbbok.

Is there something wrong with the original sheet to cause this to happen?

Thanks for any insight you all might have, as this is driving me nuts.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Why cell colors change when copying/moving


colors can be set per workbook...

Probably the sheet's designer used the colorindexes of basic
colors "Magenta" and "Yellow" and assigned them custom
RGB values..

Via Tools/Options Color you can import the colortable from the original
workbook into the new.



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


?B?a2R3?= wrote in message
:

I have a sheet with data where the headers are colored gray and a few
other cells highlighted. I am using VB to make a copy of this sheet
into a new workbook, but all the colors change to an awful bright
green and red in the new sheet. Why is this? I am only doing a
straight copy ( or move) of the new sheet.

I tried doing the copy manually (i.e. Copy, Paste.). Same thing
happened. But the colors are fine when I copy it into another sheet
_within_ the original workbbok.

Is there something wrong with the original sheet to cause this to
happen?

Thanks for any insight you all might have, as this is driving me nuts.


  #3   Report Post  
Posted to microsoft.public.excel.programming
kdw kdw is offline
external usenet poster
 
Posts: 13
Default Why cell colors change when copying/moving

I was able to set newworkbook.colors=oldworkbook.colors.
It worked great! This certainly made my week. Thanks for the hint.

But I suppose if anyone else try to make a copy of the new sheet I created,
they would run into the same problem. Is there anyway to convert the colors
over permanently?


"keepITcool" wrote:


colors can be set per workbook...

Probably the sheet's designer used the colorindexes of basic
colors "Magenta" and "Yellow" and assigned them custom
RGB values..

Via Tools/Options Color you can import the colortable from the original
workbook into the new.



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


?B?a2R3?= wrote in message
:

I have a sheet with data where the headers are colored gray and a few
other cells highlighted. I am using VB to make a copy of this sheet
into a new workbook, but all the colors change to an awful bright
green and red in the new sheet. Why is this? I am only doing a
straight copy ( or move) of the new sheet.

I tried doing the copy manually (i.e. Copy, Paste.). Same thing
happened. But the colors are fine when I copy it into another sheet
_within_ the original workbbok.

Is there something wrong with the original sheet to cause this to
happen?

Thanks for any insight you all might have, as this is driving me nuts.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Why cell colors change when copying/moving

nope.

except you could:
find "compatible" colors in the standard colorset,
reset the workbooks colors to standard and 'recolor'
the cells to the new colorindex.
(which you could do with a relatively simple macro)

Fill an array or collection with the "colormapping"
then loop thru all cells where the colorindex < xlnone
and reassign.



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


?B?a2R3?= wrote in message
:

I was able to set newworkbook.colors=oldworkbook.colors.
It worked great! This certainly made my week. Thanks for the hint.

But I suppose if anyone else try to make a copy of the new sheet I
created, they would run into the same problem. Is there anyway to
convert the colors over permanently?


"keepITcool" wrote:


colors can be set per workbook...

Probably the sheet's designer used the colorindexes of basic
colors "Magenta" and "Yellow" and assigned them custom
RGB values..

Via Tools/Options Color you can import the colortable from the
original workbook into the new.



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


?B?a2R3?= wrote in message
:

I have a sheet with data where the headers are colored gray and a
few other cells highlighted. I am using VB to make a copy of this
sheet into a new workbook, but all the colors change to an awful
bright green and red in the new sheet. Why is this? I am only
doing a straight copy ( or move) of the new sheet.

I tried doing the copy manually (i.e. Copy, Paste.). Same thing
happened. But the colors are fine when I copy it into another sheet
_within_ the original workbbok.

Is there something wrong with the original sheet to cause this to
happen?

Thanks for any insight you all might have, as this is driving me
nuts.





Reply
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
Change Cell Border Colors That70sHeidi Excel Discussion (Misc queries) 1 February 16th 09 09:14 PM
Automatically change cell colors based on date in cell Greg Excel Discussion (Misc queries) 2 January 27th 09 05:55 PM
change cell colors for 2 seconds ricowyder New Users to Excel 3 June 5th 07 01:31 PM
Cell fill colors in Excel change when copying to a new book jkbond67 Excel Discussion (Misc queries) 2 July 31st 06 09:47 PM
If a cell is a certain word I would like it to change colors. Mike Excel Discussion (Misc queries) 2 January 25th 06 07:57 PM


All times are GMT +1. The time now is 09:22 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"