Hello,
Let me start by saying that I am very new to VBA coding, so I'm sure I am making a simple mistake. I found similar questions to this on the forum, but none had exactly what I'm looking for.
I have a document that is updated daily to track certain progress in my work team. I have created a separate spreadsheet (currently called "test") where the data will be analyzed. I am trying to create an easy VBA command button to allow other members to quickly copy the necessary data onto the new sheet, updating a table with each paste. For testing purposes, I currently have all data in a single workbook. Ideally, I'd like the data to be appended to my table on test workbook. Originally, I created named ranges for the workbooks, but I have since deleted the names in order to rule out spelling error. I have two tables, "Table2" (to be copied) and "Table4" on the test workbook. The VBA code is below:
Sub Macro3()
Range("Table2").Copy Destination:=Workbooks("test.xlsm").Worksheets("Sheet1!Table4").Range("A1")
End Sub
When I try to execute the command, I get "Run-time error '9': Subscript out of range".
Please let me know if any other information is needed. I'm stuck here.
Let me start by saying that I am very new to VBA coding, so I'm sure I am making a simple mistake. I found similar questions to this on the forum, but none had exactly what I'm looking for.
I have a document that is updated daily to track certain progress in my work team. I have created a separate spreadsheet (currently called "test") where the data will be analyzed. I am trying to create an easy VBA command button to allow other members to quickly copy the necessary data onto the new sheet, updating a table with each paste. For testing purposes, I currently have all data in a single workbook. Ideally, I'd like the data to be appended to my table on test workbook. Originally, I created named ranges for the workbooks, but I have since deleted the names in order to rule out spelling error. I have two tables, "Table2" (to be copied) and "Table4" on the test workbook. The VBA code is below:
Sub Macro3()
Range("Table2").Copy Destination:=Workbooks("test.xlsm").Worksheets("Sheet1!Table4").Range("A1")
End Sub
When I try to execute the command, I get "Run-time error '9': Subscript out of range".
Please let me know if any other information is needed. I'm stuck here.