Esc Key Closes Workbook

G

Guest

All,

I am running a VBA program (via an add-in). The program is running with
ScreenUpdating set to False, so I have a Progress Bar User Form displayed
indicating program progress.

Issue: If User hits the Esc Key - the Active Workbook closes, without
warning, etc.

Question #1: Is that the normal function of the Esc Key?
Question #2: What can I do to prevent this type of action?

Thx
MSweetG222
 
T

Tom Ogilvy

If you set the cancel property of a commandbutton to True, then hitting the
escape key will fire the click event of that button. Is there a cancel
button on the userform that causes the same behavior. If so, and you can
get into the Add-In, change the property to false.

I would say that closing the workbook is not a typical function of the Esc
key - although it might be if were on a useform used to challenge access to
a workbook by prompting for a password.
 

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

Top