Automation Error--Server Threw Exception

P

Peter L Reader

I'm converting an Access 97 app to Access 2K3. Everything seems to
work, except for a module in which I open Excel, create a workbook,
load it with values from the database, and save it. All is well until
I try to execute:
myworkbook.saveas filename:="drive:\path\filename.xls"
At this point, I get the dreaded Automation Error--The Server Threw an
Exception. If I continue and close Access, Excel asks me if I want to
save "workbook1.xls". When I say Yes, then open the saved workbook,
it looks perfectly ok (except for being saved in the wrong place with
the wrong name). Just the file save routines seem to be hosed. I can
save a workbook in Excel with the identical filename and path, so the
name is ok.

My references include Excel 11.0, OLE Automation, and Microsoft VBA
Extensibility 5.3. I am using early binding (I tried late binding,
but it made no difference).
Can anyone shed any light on this?
Peter
 

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

Top