View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
macroapa macroapa is offline
external usenet poster
 
Posts: 14
Default Using VBA to close a running application

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