I use this code to copy my code from another workbook to another:
Dim PayMR_Data_Columns As Long, sourcePayMR As Range
PayMR_Data_Columns = ThisWorkbook.Worksheets("Pay-MR").Cells(1, Columns.Count).End(xlToLeft).Column
Set sourcePayMR = ThisWorkbook.Worksheets("Pay-MR").Range("A2:" & Col_Letter(PayMR_Data_Columns) & Total_rows_PayMR)
'Copies value from source to Payroll Data
With Workbooks("Payroll Data.xlsm").Worksheets("Pay-MR Compiled").Range("A" & Total_rows_PayMRCompiled + 1 & ":" & Col_Letter(PayMR_Data_Columns) & Total_rows_PayMRCompiled + Total_rows_PayMR - 1)
.Value = sourcePayMR.Value
End With
Please refer to the image below:
The white rows indicate that the table did not expand. On my other tables, the exact same code works and expands the table, but I do not understand why it does not expand in this case, but when I type a letter it does as shown below: