Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL PASTE COLOUR ERROR

Status
Not open for further replies.

dilworth

Technical User
May 29, 2002
59
GB
I am trying to copy some information to a new workbook however the colours are not copying over-the cell background on the source data is Dark Blue and the font colour is white, however when this is pasted the cell background is black and the font colour is red.

This doesn't happen when pasting information within the same worksheet-I have tried using 'Paste Special-Formats' and moving the work sheet but this doesn't work.

The source data has originated from a citrix based application although the format matches the colours when it is in the originally exported spreadsheet.

Any suggestions appreciated.

 
Sounds like you have a different colour palette set up in the source workbook copmpared to the destination workbook...

How has the initial workbook been created ?

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
You can copy colour palette between workbooks (Tools>Options>Colour tab, both workbooks should be opened, the destination one selected).

combo
 
Thanks for the replies-the source data is exported from a SQL application that is hosted on a Citrix Server-the application export function requests the location of where the spreadsheet should be exported to-it then creates the spreadsheet.

I can use the suggestion of copying the colour palette, how ever the colour palette on the source workbook only contains limited colors and I wouldn't want this to affect general spreadsheets-also the export is run frequently so this would be time consuming-any suggestions on how to change the colours on the source workbook so it matches the standard excel colours would be very helpful.


 
The colour palette is linked to a single workbook, it contains 56 items (RGB values, to define), maximal number of different colours within workbook.

The import syntax for vba:
Workbook(x).Colors = Workbooks(y).Colors

When data (formatted) is copied to another workbook, colour indexes are copied. To keep colours matched without touching the palette, you should then find equivalent colour indexes. Next, various formatting items' colour indexes (as for interior, pattern, borders, font colour) should be tested and replaced. In general it will not be an exact match and much more time consuming.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top