Solved

VBA - How to close an external application though code

Posted on 2006-11-10
6
655 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

728 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