Any ideas why Macro will not run...

  • Thread starter robertfuschetto via AccessMonster.com
  • Start date
R

robertfuschetto via AccessMonster.com

I inhereted a user database with a form and a button. Click the button and a
variety of queries run, tables are made etc etc. The end result is to be an
Excel file that opens where the user refreshes a pivot linked to the Access
data base.

The process works fine when I run it. Essentially a bunch of vba code is run
to open queries and such. The last vba statement though calls a macro:
DoCmd.RunMacro "mcrOpenDetailReport".

The macro simply issues the RunApp command:
Excel "X:\ABCAccounting\Reports\MyReport.xls".

Like I said it all works fine for me. The spreadfsheet opens on my pc. Whe
the
user tries to run it though fails as soon as it hits the DoCmd.RunMacro
"mcrOpenDetailReport code.

Note that the user can open the Excel file manually; outside of MsAccess.

Ideas?
 
S

Steve Schapel

Robert

The Command Line of the RunApp action should specify the path to the
Excel executable, for example...
"C:\Program Files\Microsoft Office\Excel.exe"
"X:\ABCAccounting\Reports\MyReport.xls"
 
R

robertfuschetto via AccessMonster.com

WOuld there be a reason why it works as is on my pc, but not the users?

Steve said:
Robert

The Command Line of the RunApp action should specify the path to the
Excel executable, for example...
"C:\Program Files\Microsoft Office\Excel.exe"
"X:\ABCAccounting\Reports\MyReport.xls"
I inhereted a user database with a form and a button. Click the button and a
variety of queries run, tables are made etc etc. The end result is to be an
[quoted text clipped - 16 lines]
 
S

Steve Schapel

Robert,

I'm sorry, I don't know. I have never seen it done like you told us.
All I can suppose is it has something to do with a Windows setting on
your machine that allows 'Excel' to be recognised as a pointer to the
excel.exe programme.
 

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