Format lost after pasting range
I lost my formatting after pasting a range from another sheet w/in a workbook into an other sheet. Here's my code:
VB Code:
shtSrc.Range("A1:Z10").Copy
shtDest.Range("A" & nS).PasteSpecial xlPasteAll
Set rangeX = shtDest.Range("A" & nS & ":L" & nE)
I had successfully copied all the data and the formula except the formatting. Thanks in advance!
Re: Format lost after pasting range
Looks like it should be pasting all which includes xlPasteFormats. If you change it from xlPasteAll to xlPasteFormats will it at least paste the formats that you have lost?
Re: Format lost after pasting range
dRAMmer ...
Selection.Paste or Selection.PasteSpecial Paste:=xlPasteAll should copy the formatting from the source and override any previous formatting in the destination. Exactly what Format properties aren't getting copied correctly from the source to the destination?
Re: Format lost after pasting range
Hi Rob! If I will only use xlPasteFormats no data will be copied, so what I did is to xlPasteAll first then xlPasteFormats afterwards, still nothing happened.
Webtest,
Mostly column merging.
Workaround: I don't want to do this as much as possible but if there's no solution for this, I will have to go to formatting the destination manually. Hope you can give some suggestions and possibly a solution. Thanks for the replies!
Re: Format lost after pasting range
From my previous post ...
Quote:
Originally Posted by Webtest
dRAMmer ...
...
Exactly what Format properties aren't getting copied correctly from the source to the destination?
...
Are you dealing with CONDITIONAL formatting???