H
Hal2604 via AccessMonster.com
I am trying to use VB to import a spreadsheet the line of code is as follows:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "WeeklyImport",
"P:\Unapplied\Unapplied.xls", True, "Detail"
I get Error 3011 MS JetDatabase Engine couldn't find object "Detail" when I
run the code off a button. Detail is the name of the worksheet. If I take
the name of the worksheet off it imports okay. The problems is it may not
always be the first worksheet so I need to specify which worksheet.
I use the line of code for another spreadsheet/worksheet combo & it works
fine. I can't figure out what I am doing wrong. Any help would be
appreciated.
Thank you
Holly
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "WeeklyImport",
"P:\Unapplied\Unapplied.xls", True, "Detail"
I get Error 3011 MS JetDatabase Engine couldn't find object "Detail" when I
run the code off a button. Detail is the name of the worksheet. If I take
the name of the worksheet off it imports okay. The problems is it may not
always be the first worksheet so I need to specify which worksheet.
I use the line of code for another spreadsheet/worksheet combo & it works
fine. I can't figure out what I am doing wrong. Any help would be
appreciated.
Thank you
Holly