Solved

VBA - How to close an external application though code

Posted on 2006-11-10
6
615 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now