PC Review


Reply
Thread Tools Rate Thread

Close External Apps Issue

 
 
Chris
Guest
Posts: n/a
 
      15th Jul 2009
I coded this macro to close two external applications when activated.
The macro was working perfectly fine before but now it fails to send
the SendKeys properly and neither application closes. I don't know if
it is an issue with the coding or due to computer related issues.

The code I used is:

Sub CloseApp()
AppActivate "X"
SendKeys "%{F4}"
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "~"
Application.Wait (Now + TimeValue("0:00:05"))
AppActivate "Y"
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "%{F4}"
End Sub

Substituted "X" and "Y" for the actual app names.

Thanks for your help in advance.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3GB RAM and it's always telling me to close apps Greg Windows Vista General Discussion 54 2nd Oct 2008 07:49 AM
Best way to close running apps =?Utf-8?B?Q3VydGlz?= Windows XP Help 3 26th Aug 2006 03:56 AM
Close all apps but NOT restart? Rick C. Microsoft Windows 2000 3 22nd Mar 2004 02:47 PM
Re: Using external apps Graham R Seach Microsoft Access VBA Modules 4 2nd Mar 2004 08:36 PM
Need to close MS apps before shutdown Gary Windows XP Basics 1 10th Sep 2003 04:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 PM.