"this table contains cells which are outside the range of cells defined in this spreadsheet"
I am trying to import the content of a spreadsheet into my db using an "DoCmd.TransferSpreadsheet". I am importing a specific range of cells from a specific sheet in my spreadsheet and I am getting this error. The code is:
DoCmd.TransferSpreadsheet transfertype:=acImport, tablename:="tbl_Holding", Filename:=CostAllocationReportFiletoImport, hasfieldnames:=True, Range:="Rooms All!d5:m10000"
But here is the strange thing - if I go into the file and change the name of the sheet and then change it in the code, it works fine. So I thought maybe it is the space in the name of the sheet. BUT when I put the space back in, it will also works fine.... When I then however go back to the original copy of the spreadsheet and try to import it again it will run the same error again even though the original copy and the new copy of the file are now identical...