kshitij_dch
Active Member
- Joined
- Apr 1, 2012
- Messages
- 362
- Office Version
- 365
- 2016
- 2007
- Platform
- Windows
I have a macro which copy and paste data from one workbook to another , below code only replaces code by copying the content every time , Instead I want macro to find next empty row and paste data in the master
VBA Code:
'## Open both workbooks first:
Set X = Workbooks.Open("C:\Users\K****ij Sharma\Desktop\important.xlsm")
Set Y = Workbooks.Open("\\192.156.10.78\analytics\K****ij\Master.xlsm")
'Now, copy what you want from x:
X.Sheets("Sheet1").Range("A1:AA500").Copy
'Now, paste to y worksheet:
Y.Sheets("sheet1").Range("A1").PasteSpecial
'Close x:
X.Close
Y.Close