Link to home
Start Free TrialLog in
Avatar of garygrouse
garygrouse

asked on

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?

Regards,
Daniel
Avatar of rockiroads
rockiroads
Flag of United States of America image

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
https://www.experts-exchange.com/questions/22056331/Close-Outlook-From-Access.html

this example closes outlook, I find by looking at the window caption
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of garygrouse
garygrouse

ASKER

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.