colmkav
2012-05-21 12:11:32 UTC
Hi,
I am trying to execute the following code in order to automatically
import an excel file to my Access database
DoCmd.TransferSpreadsheet TransferType:=acImport,
SpreadSheetType:=acSpreadsheetTypeExcel5, TableName:="Newdata", _
Filename:=sExcelFile, HasFieldNames:=True
I get the error msg "The command or action 'TransferSheet Data' ins't
available now."
However, when I try to import the file (sExcelFile) manually I am able
to do so.
Where am I possibly going wrong with the code?
regards
Colm
I am trying to execute the following code in order to automatically
import an excel file to my Access database
DoCmd.TransferSpreadsheet TransferType:=acImport,
SpreadSheetType:=acSpreadsheetTypeExcel5, TableName:="Newdata", _
Filename:=sExcelFile, HasFieldNames:=True
I get the error msg "The command or action 'TransferSheet Data' ins't
available now."
However, when I try to import the file (sExcelFile) manually I am able
to do so.
Where am I possibly going wrong with the code?
regards
Colm