I am trying to copy a dynamic range from a table and copy it to another workbook but am having issues copying the dynamic matrix that is created.
I've tried multiple lines of code but with similar results. I've stepped through the code one line at a time, and the lastRow and lastColumn functions return the expected values. The issue arises when I try to select the matrix and copy it. I feel like there's a simple fix and I'm missing something.
Workbooks.Open Filename:=OOBmap
'Copies AM open order book and pastes it into master spreadsheet
Set startCell = ActiveSheet.Range("A1")
lastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
lastColumn = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column
ActiveSheet.Range(Cells(1, lastRow), Cells(1, lastColumn)).Select
Selection.Copy