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![Frown :( :(](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f641.png)
Please help me if you know the solution.![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
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
![Frown :( :(](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f641.png)
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.
![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
Thanks in advance