Hi All,
I'm using VBA to copy and paste a pivot table's values and formatting. The code works for the most part (i.e. it pastes values, font, etc.) but for some reason, some of the cell coloring doesn't show up in the pasted result.
Any idea what I'm doing wrong?
I'm using VBA to copy and paste a pivot table's values and formatting. The code works for the most part (i.e. it pastes values, font, etc.) but for some reason, some of the cell coloring doesn't show up in the pasted result.
Code:
With ns.Range("A1")
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End With
Any idea what I'm doing wrong?