But you used PasteSpecial and specified xlPasteValues for the Paste argument... only the cell values will get copied with your code, the formatting will be lost. As far as I know, both your 3-line code snippet and my one-liner will produce the same identical output.
Yes, thanks Rick - spot on (again).
Ravi, if you want the formatting as well as the value, use this...
Code:
ActiveWorkbook.ActiveSheet.Range("A1:O100").Copy
With ThisWorkbook.Worksheets("Upload").Cells(j, "A")
.PasteSpecial Paste:=xlPasteValues
.PasteSpecial Paste:=xlPasteFormats
End With
Application.CutCopyMode = False
...or if it's just the values use Rick's solution (you can of course still use mine but 1 line is better than 3!!)
Regards,
Robert
Bookmarks