View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Al[_17_] Al[_17_] is offline
external usenet poster
 
Posts: 5
Default Close Excel if macro stopped

I did read up on the onkey and tried this:

Application.OnKey "{esc}", "" at the top. unfortunately, this didn't
work and I could still interrupt the macro (also tried w/ capital ESC)
w/ the ESC key. Not sure why.

However, this one did the job.

Application.EnableCancelKey = xlDisabled

(I am not a developer/programmer by the way, so this might be very
rudimentary).


Thanks for your help - you put me on the right track!
Al

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!