fahadalambd
New Member
- Joined
- Sep 16, 2022
- Messages
- 31
- Office Version
- 2016
- Platform
- Windows
Good Afternoon everyone,
I need to copy all the data from one workbook (Test1.xlsx) to another workbook (Test2.xlsm).
There are so many sheets in Test1.xlsx file but I need to copy only "Sheet1".
So far, I tried the below code but it is not working
Please help me if you know the solution.
Thanks in advance
I need to copy all the data from one workbook (Test1.xlsx) to another workbook (Test2.xlsm).
There are so many sheets in Test1.xlsx file but I need to copy only "Sheet1".
So far, I tried the below code but it is not working
VBA Code:
Sub move_data()
Workbooks("Test1.xlsx").Worksheets("Sheet1").Range("A1").Copy _
Workbooks("Test2.xlsm").Worksheets("Sheet2").Range("A2")
End Sub
Please help me if you know the solution.
Thanks in advance