TransferSpreadsheet command

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

Guest

Hi,
I worte the below code to export an access table into excel sheet,first it
was working well,later it gave me an error message"Microsoft jet database
cannot find the object ". make sure the object exists or you've written the
correct path...ecc" and sometimes "Type mismatch"
The code I'm using is:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Annual",
"C:\Documents and Settings\botroswadia\Desktop\Arb-Eng.xls", True, ""

Can anybody help?
 
Where are you running the code from?

I had a similar error where working code suddenly breaks. I never solved
why it happened. But I was able to get rid of the error by requerying my
form, and the export would work.
 
Back
Top