Using VBA to close a running application

M

macroapa

Hi,

I'd like to have some VBA code in excel that will close a running app
if it's open.

Now I've found some code that closes all apps of a type (ie kills all
instances of msaccess.exe), but I want to close just certain access
db's, not all of them.

I've tried:

killstring = "taskkll /f /fi windowtitle eq filename : database
(Access 2000 file format) - Microsoft Access"
Call Shell(killstring, vbhide)

But this doesn't seem to work.

Are there any other solutions?

Thanks
 
E

eliano

Hi,

I'd like to have some VBA code in excel that will close a running app
if it's open.

Now I've found some code that closes all apps of a type (ie kills all
instances of msaccess.exe), but I want to close just certain access
db's, not all of them.

I've tried:

killstring = "taskkll /f /fi windowtitle eq filename : database
(Access 2000 file format) - Microsoft Access"
Call Shell(killstring, vbhide)

But this doesn't seem to work.

Are there any other solutions?

Thanks


Hi macroapa.
See: http://support.microsoft.com/kb/210518/en-us
Regards
Eliano
 

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