Control & Break

  • Thread starter Thread starter Alan.Hutchins
  • Start date Start date
A

Alan.Hutchins

I have a problem with 1 or 2 "super" users.

Occasionally they will press the Ctrl+Break keys because
they can't be bothered to make a couple of simple
selections (which only takes3 to 4 seconds anyway).

As a result, the information they supply can be incorrect
because they may have entered data against a cost centre
that is not valid for their entity (I can't validate their
data as it has to be free form entry).

Is there a way that I can stop Control & Break from
stopping the execution of my code during the Auto_open
procedure ?

Also, I want to make sure that it is re-enabled when the
Auto_open procedure has completed.

Many Thanks
Alan
 
Look at Excel VBA help on EnableCancelKey

I know that works with escape and I assume it works with ctrl+break although
I haven't tested it.
 
I am not absolutly sure but I think Control+Break is hard
coded in stone. It's the programers panic button.
 
Tom,

Many thanks - you are correct.

However, if I disable it, I could end up with a continuous
loop - which is not a good idea, so instead, I can use the
functionality to ask for a password (so that I can break
out of the code) which the user won't know.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top