I am trying to import a specific worksheet from an excel document into Access. The excel document contains two tabs, UploadTest, and UsageExport. I am trying to figure out how to import only the data in the UsageExport tab, which is the second tab in the document. The problem is that the code seems to look at the first tab. Below is my code:
DoCmd.TransferSpreadsheet transfertype:=acImport, _
spreadsheettype:=asSpreadsheetTypeExcel7, _
tablename:="tblUpload", _
filename:="H:\Access\User Story Database Uploads\UsageUpload.xls", _
hasfieldnames:=True, _
range:=UsageExport
Before I added the second tab to the spreadsheet, and added the range: line to this procedure, it worked perfectly. I am sure that it is something really simple, but the solution is eluding me.
Thanks
Kirk
DoCmd.TransferSpreadsheet transfertype:=acImport, _
spreadsheettype:=asSpreadsheetTypeExcel7, _
tablename:="tblUpload", _
filename:="H:\Access\User Story Database Uploads\UsageUpload.xls", _
hasfieldnames:=True, _
range:=UsageExport
Before I added the second tab to the spreadsheet, and added the range: line to this procedure, it worked perfectly. I am sure that it is something really simple, but the solution is eluding me.
Thanks
Kirk