Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Close External Apps Issue

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help - Alt-E hotkey does not work in MSOffice apps, no prob in other apps Bob Newheart Excel Discussion (Misc queries) 4 July 28th 08 03:57 PM
Issue on Close Q Sean Excel Programming 5 January 16th 07 05:54 PM
Excel closes all open apps when i close one ipctech Excel Discussion (Misc queries) 1 May 25th 05 12:04 AM
Is Controlling External Apps with Excel VBA possible? Azazel_123 Excel Programming 1 January 23rd 04 06:02 PM
After OpenText all pastes from external apps use format from OpenText Jim[_31_] Excel Programming 1 November 8th 03 02:17 AM


All times are GMT +1. The time now is 07:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"