I have two different approaches to copy and paste data from one spreadsheet to another.
For some reason, the first approach which requires more lines of code works while the shorter version doesn't.
I've tried the shorter version for other cells and it works perfectly. Any ideas on why it doesn't work would be greatly appreciated.
1st approach:
2nd approach:
For some reason, the first approach which requires more lines of code works while the shorter version doesn't.
I've tried the shorter version for other cells and it works perfectly. Any ideas on why it doesn't work would be greatly appreciated.
1st approach:
Code:
Windows("Schedule.xlsx").Activate
Sheets("QF.IPP").Select
Range("P10,T10").Select
Application.CutCopyMode = False
Selection.Copy
Windows("ID_DOG.xlsm").Activate
Range("I30").Select
ActiveSheet.Paste
2nd approach:
Code:
Workbooks("Schedule.xlsx").Sheets("QF.IPP").Range("P10,T10").Copy
Workbooks("ID_DOG.xlsm").ActiveSheet.Range("I30").PasteSpecial