Darren Smith
Well-known Member
- Joined
- Nov 23, 2020
- Messages
- 631
- Office Version
- 2019
- Platform
- Windows
Trying to copy merged cells to Merge cells.
It copies fine but won`t paste?
Error is 1004 Application-defined or object-defined error
It copies fine but won`t paste?
Error is 1004 Application-defined or object-defined error
VBA Code:
Private Sub Jobcard_Demands_Change()
If Jobcard_Demands = ("Details to Jobcard Analysis Sheet") Then
Dim SourceLastrow As Long
Dim wsDest As Worksheet
Set wsSource = ThisWorkbook.Sheets("Job Card Master")
Set wsDest = ThisWorkbook.Worksheets("Job Card with Time Analysis")
SourceLastrow = wsSource.Range("A" & Rows.Count).End(xlUp).Row
wsSource.Range("A2:N" & SourceLastrow).Copy
wsDest.Range("A2").MergeArea.PasteSpecial xlPasteValues
End If
End Sub