Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I close an application from Excel

Status
Not open for further replies.

RayfromIntech

Electrical
Joined
Jun 2, 2003
Messages
34
Location
CA
I have an external application that I can start using the shell and path function. The application runs in my system tray.
I want to create a button in excel that will activate a macro that will stop this application.

I dont know the syntax or the proper function to use.

For example the program I want to stop is called Update.exe
When it runs, it is only in the tray at the bottom right of the screen.(It's not a minimized window) The path for this is C:\datalog\update.exe

Now how can I tell a Macro in Excel to stop and exit this application. A solution word for word would be nice.

Thank you to all.
 
Not very elegant, but you could use the "sendkeys" method. This basically mimics keyboard strokes, it takes a bit of fiddling to get it right, but it works. Its a way of automating applications that don't have any inbuilt programming language. Theres quite a bit about "sendkeys" in the VBA helpfile along with an example using the windows calculator.

Best regards

finnigan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top