orangebloss
Board Regular
- Joined
- Jun 5, 2013
- Messages
- 51
- Office Version
- 365
- Platform
- Windows
I'm trying to copy cells with formulas in and paste special on another sheet - This works fine - but I need to copy over the formatting too (Colour of cells, size of font etc) but I seem to be going around in circles.
I tried recording the paste special values and formats which worked until I tried to put it into my VBA.
The code finds the last blank cell and pastes in the values, I then want it to paste the format of the copied cells in the same place - but no result
Any help appreciated!
I tried recording the paste special values and formats which worked until I tried to put it into my VBA.
The code finds the last blank cell and pastes in the values, I then want it to paste the format of the copied cells in the same place - but no result
Any help appreciated!
VBA Code:
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = Worksheets("Rough Cut")
Set pasteSheet = Worksheets("Sandbox")
Set Destination = pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Destination.PasteSpecial Paste:=xlPasteValues
Destination.PasteSpecial Paste:=xlPasteFormats
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub