
Import From Excel 2000 with VBA code into Access 97
I am puzzled. I have been importing an Excel 2000 workbook into Access 97
and its been working. The Excel 2000 workbook has some
VBA code in the
BeforeClose event that validate some entries,etc. I revised some of the code
yesterday and now when clicking on the import button in Access 97, it
states:
"Couldn't decrypt file. 25003161". Error number 3161.
My Access VBA executes that following command:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97,
"tblBCSiteAlloc_Import", strPathFile, True, "bcsaImport"
This error occurs when the Excel workbook being imported is close, but when
I have the workbook open and execute the import process it completes the
import successfully. Before my recent Excel VBA changes, everything worked
okay.
What is happening here? Why? Is it because the Excel workbook "appears" not
to be an acSpreadsheetTypeExcel97 type when it is in a closed state but when
open it does?
Howard Walters