Dear all,
I'm trying to copy a data from the open file into the code-running file:
There is a problem with the last row. "calc" is the property name of the sheet in the ThisWorkbook. How can I fix it?
Thanks in advance
I'm trying to copy a data from the open file into the code-running file:
Code:
myFile = varPath & varFileName
Set wb = Workbooks.Open(myFile)
Set tbl = wb.Worksheets(varSheetName).Range(varRangeName)
tbl.Offset(1, 0).Resize(tbl.Rows.Count - 1, tbl.Columns.Count).Copy
ThisWorkbook.Worksheets(calc).Cells(y + 1, 1).PasteSpecial
There is a problem with the last row. "calc" is the property name of the sheet in the ThisWorkbook. How can I fix it?
Thanks in advance