Workbook Open - Prevent CTRL Break

  • Thread starter Richard Buttrey
  • Start date
R

Richard Buttrey

I have a workbook in which the Open Event contains code which deals
with prompting the user for a password, and then allowing them to
continue using the workbook assuming the correct password is entered.

How can I prevent the user breaking out of the macro with the CTRL
Break keys?

Are there any dangers inherent in this approach apart from the obvious
one of myself as 'owner' of the workbook not being able to break out
of the code for admin purposes?

Although I've written code for prompting for and changing passwords,
does anyone have or can point me to a URL which has code to do this?
I'd like to compare an alternative approach.

TIA

Richard Buttrey
 
D

Dave Peterson

Take a look at:
Application.EnableCancelKey
in VBA's help.

(if your code runs before the quickest of users!)

Maybe you could have a dummy workbook set this, then open your workbook.

If they cntl-break, then only your dummy workbook is opened.
 
Top