Error using RunApp

Sean Stevens

Board Regular
Joined
Jul 24, 2003
Messages
123
I have a very simple .bat file that I invoke from a macro in Access 2003, which deletes a file on my d: drive.

This macro works fine on my PC and a colleagues. However, on another user's PC it gives an error;

"MS Access can't invoke the application using the RunApp action. The path to the application is invalid, or a component of the application is missing."

I have checked the path and it is correct and the .bat file runs fine from windows explorer. Any idea what can be causing this??
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Sean

How exactly are you running the bat file?
 
Upvote 0
Sean

I don't think I've ever heard/seen of RunApp being used to run a bat file.

Why not just use Shelll?

Or even create code that uses Kill to delete the files?
 
Upvote 0
Sean

I don't think I've ever heard/seen of RunApp being used to run a bat file.

Why not just use Shelll?

Or even create code that uses Kill to delete the files?

Thanks for the help - I am picking up the support of an Access application after a colleague has left. Never used Access macros before, but I am proficient in Excel VBA. How do I invoke the two methods you have mentioned above?
 
Upvote 0
I can write the VBA to do the delete via the Kill statement. How do I execute the VBA from within an Access macro?
 
Upvote 0
Worked out how to do it - was missing the parantheses from my function name in the RunCode statement.

Thanks for the help.
 
Upvote 0
Sean

Why not convert the macros to VBA?
 
Upvote 0

Forum statistics

Threads
1,224,271
Messages
6,177,609
Members
452,785
Latest member
3110vba

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top