Control & Break

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
 
T

Tom Ogilvy

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.
 
G

Guest

I am not absolutly sure but I think Control+Break is hard
coded in stone. It's the programers panic button.
 
A

Alan Hutchins

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.....
 
Top