0
votes

I created an investment analysis workbook. The results are summarized within an overview/dashboard.

The macro then copies the specified cell range (dashboard range), creates a new worksheet and pastes the dashboard on the new sheet. All works ok.

However, the color scheme of the cells and copied graphs change.

Which command enables to "lock/fix" the colours of a cell before copying/pasting it and that integrates with an existing sub()?

1
which of them you try? XlPasteType EnumSfagnum

1 Answers

0
votes

You can paste in different ways in vba with .Pastespecial xlPaste-.

Here are a few options that might work in your case:

xlPasteAllExceptBorders which will paste your cell value or formula, the formatting, the background colour, all but the borders. Most likely useful in your case.

xlPasteValues pastes only the value of the cell (not the formula creating the value), none of the formatting.

xlPasteFormats pastes only the current formatting of the cell, including background colours and borders, but no values or text.

And many more