Solved

VBA - How to close an external application though code

Posted on 2006-11-10
6
638 Views
Last Modified: 2008-03-17
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
Comment
Question by:garygrouse
  • 2
6 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 17920152
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
 
LVL 65

Accepted Solution

by:
rockiroads earned 125 total points
ID: 17920320
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
 
LVL 4

Assisted Solution

by:GordonPrince
GordonPrince earned 125 total points
ID: 17920774
What about putting "Unload Me" in the VB app, which will close the application after the work is done.
0
 

Author Comment

by:garygrouse
ID: 17921352
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question