Running Excel macro produces error

S

Snowsride

Hi

I'm calling an Excel macro from Access and get an error

440 Method 'Run' of object '_Application' failed

I've cut and pasted the offending piece of code into a separate procedure:

Sub Test()

ActiveWorkbook.SaveAs Filename:= _
"C:\Apps\Reward and Recognition\Quarterly reports\" _
& "Quarterly KPIs.xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

ActiveWorkbook.Close SaveChanges:=False

End Sub

Help appreciated.
 
K

Klatuu

Unless there is code you are not showing, I don't see where you have created
any Excel objects.
 
S

Snowsride

Klatuu

The code is the Excel macro. I'm calling it from Access where I've created
the Excel object - oter code called in this way works but not that shown
below.
 

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