How to stop a MS macro from a VBA program

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
JPBernoux
Newbie
Posts: 8
Joined: Tue Nov 09, 2004 3:11 pm
Location: Raleigh, NC, USA

How to stop a MS macro from a VBA program

Post by JPBernoux » Thu Oct 13, 2005 8:59 pm

This is a follow-up on my previous posting on how to start a MS macro from VBA. Now I need to stop a MS macro from VBA. I know how to stop a macro from the keyboard by typing {shift} {escape} but when I try to do this from VBA it is not working. Here is the VBA sequence I'm using:

Sub testexitMS()
Application.SendKeys ("+{ESC}")
End Sub

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts