Ramadan2512
Board Regular
- Joined
- Sep 7, 2024
- Messages
- 68
- Office Version
- 2021
- Platform
- Windows
I'm stuck with task to copy table from a closed workbook to another workbook
the source workbook name is ("Carnell") and this is the file path "D:\Desktop\carnell.xlsm" with only one sheet named ("Data") it has a table "table1" with updating new data every day
the workbook that i need to pate the table in it is "AUTHS" with different worksheets and i need to paste to a sheet named "info"
I need a way please to update between sheets whenever new data added to the source table eithr automatically with the code or even with a button to update data between them I don't mind to copy only values or with formulas
I have found a simple code on the niternet but it seems that not matching with my files as i get error message say (object doesn't support this property or method
any suggessions please
the source workbook name is ("Carnell") and this is the file path "D:\Desktop\carnell.xlsm" with only one sheet named ("Data") it has a table "table1" with updating new data every day
the workbook that i need to pate the table in it is "AUTHS" with different worksheets and i need to paste to a sheet named "info"
I need a way please to update between sheets whenever new data added to the source table eithr automatically with the code or even with a button to update data between them I don't mind to copy only values or with formulas
I have found a simple code on the niternet but it seems that not matching with my files as i get error message say (object doesn't support this property or method
any suggessions please
VBA Code:
[
Sub GetDatacClosedBook()
Dim src As Workbook
Setsrc = Workbooks.Open("D:\Desktop\carnell.xlsm", True, True)
ThisWorkbook.Activate
Worksheets("Data").Range("A1:K200").Formula = src.Worksheets("info").Range("A1:k200").Formula
End Sub]