Importing Excel into Access 97

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm still using a Access 97 version for many reasons I won't go into, but
need help importing a later Excel version into it using VBA.
I can currently use the following code to import all but later versions of
Excel.
Can anyone point me in the right direction?
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel5, "InputData",
strInputDir, False, ""
 
When I use acSpreadsheetTypeExcel8 I get the error variable not defined.
I've tried re-regisering dll files (regsvr32
msexcl35.dll,msxbse35.dll,mspdox35.dll,and mstext35.dll).
Any other suggestions?
 
Hi Jennie,

My fault. In Access 97 the constant is called acSpreadsheetTypeExcel97
not acSpreadsheetTypeExcel8 (that's used in later versions).
 
I've lost track of just what you're trying to do. But either
acSpreadsheetTypeExcel97
or
acSpreadsheetTypeExcel8
should work in Access 2002 and later.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top