LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Difference Escape and Ctrl + Break to interrupt code

Have a bit of code with this simplified construction:


Sub Test()

On Error GoTo STOPTEST
Application.EnableCancelKey = xlErrorHandler

OtherSub

Do While Condition = True
DoEvents
OtherSub
DoEvents
Loop

STOPTEST:

MsgBox "Stopped Test"

End Sub

Now when I am in the Sub OtherSub the Escape key will interrupt this code
and go to STOPTEST, but not when
I am in the Do While loop and not in OtherSub.
Ctrl + Break/Pause will work in both situations.
What could be the explanation for this?
Ideally I would like the Escape key to work in both situations.


RBS

 
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
Is there a difference between CTRL+D and CTRL+" (quotation marks) AKMMS Excel Discussion (Misc queries) 2 March 22nd 10 07:43 PM
Ctrl+Alt+Break Tom Excel Programming 0 April 13th 05 12:22 PM
Can Not Get Macro to Break with CTRL-BREAK Break Me? Excel Programming 0 September 8th 04 03:15 AM
Control Break and Escape for Interrupting Code Tim Childs Excel Programming 3 May 21st 04 12:51 PM
Message box that does not interrupt code Claude Excel Programming 2 October 10th 03 04:12 PM


All times are GMT +1. The time now is 12:16 PM.

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"