Import From Excel 2000 with VBA code into Access 97 
Author Message
 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



Wed, 16 Oct 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Excel 97 VBA vs Excel 2000 VBA

2. vba code to copy table from access 97 to excel 97

3. Access 2000 VBA Handbook vis a vis Access 97 VBA Handbook

4. Compatibility Problem Using MS Excel 97 VBA on Excel 2000/XP - Causes crashes

5. Importing an Access 2000 table into another Access 2000 database with VB Code

6. importing excel 97 srpeadsheets to access 97

7. Import from Excel 97 to Access 97 table

8. Access 97 VBA modifications not visible in Access 2000

9. Using VBA to Convert Access 2000 database to Access 97

10. vba access 97 -> access 2000

11. VBA OpenDatabase: Access 97 <-> Access 2000

12. Converting Access 97 to Access 2000 via VBA

 

 
Powered by phpBB® Forum Software