Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 675
  • Last Modified:

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
0
garygrouse
Asked:
garygrouse
  • 2
2 Solutions
 
rockiroadsCommented:
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
http://www.experts-exchange.com/Databases/MS_Access/Q_22056331.html

this example closes outlook, I find by looking at the window caption
0
 
rockiroadsCommented:
some code here to kill apps by name rather than window title
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20792368.html
0
 
GordonPrinceCommented:
What about putting "Unload Me" in the VB app, which will close the application after the work is done.
0
 
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.
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now