PDA

View Full Version : Copy & Paste



Mmon0429
03-15-2019, 11:10 AM
This should be super simple, but it is not working:


Sub CopyPaste()

Dim a As Workbook
Dim b As Workbook

Set a=Workbooks.Open("File Location")
Set b=Workbooks.Open("File Location")

a.Sheets("Division Chart").Cells.Copy
b.Sheets("Division Chart").Cells.PasteSpecial xlPasteValues

End Sub


I'm getting an error in the final step when it is trying to paste.

Error: All merged cells must be the same size (but the sheets are exact copies of each other..)

What's wrong? Thanks

Logit
03-17-2019, 07:58 PM
.
Have you tried "unmerging" the cells (both workbooks) to see if the macro works ?