VBA - How to close an external application though code

I have a backup & update procudeure that I run which starts off with an external VB6 application copying / remaning a new databse into the databse directory and then launching the new databse to start the data transfer. I need to know if there is code that I can, on load or completion of data transfer to the new databse, close the external VB6 application?

Who is Participating?
rockiroadsConnect With a Mentor Commented:
some code here to kill apps by name rather than window title
why cant u get your vb6 app to close down?  can u not code it in there?

if your vb6 has a window, u can use this code I posted whereby u get the window handle of a window then issue a close using that

this example closes outlook, I find by looking at the window caption
GordonPrinceConnect With a Mentor Commented:
What about putting "Unload Me" in the VB app, which will close the application after the work is done.
garygrouseAuthor Commented:
I did not create the VB app, that is why it does not close how I want it too.

I will give those solutions a go,thanks again for your help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.