R
RJH
With help from this group, a MS VB book and trial & error I have created
some code that runs pretty well. My question is about how to guard against
an 'Esc' key press. I'm using the "Application.EnableCancelKey =
xlErrorHandler" command and in the errorhandler I'm putting up a message box
that asks if the user would like to quit the procedure or not (vbYesNo).
The Yes response works fine (exit sub). The No response (resume next)
causes several problems depending on where the code was when 'Esc' was
pressed. A range select error, object not defined error or it will just
finish up as it should. Why wouldn't it just go back and pick up where it
left off every time?
some code that runs pretty well. My question is about how to guard against
an 'Esc' key press. I'm using the "Application.EnableCancelKey =
xlErrorHandler" command and in the errorhandler I'm putting up a message box
that asks if the user would like to quit the procedure or not (vbYesNo).
The Yes response works fine (exit sub). The No response (resume next)
causes several problems depending on where the code was when 'Esc' was
pressed. A range select error, object not defined error or it will just
finish up as it should. Why wouldn't it just go back and pick up where it
left off every time?