Unloading a form using the ESC key

J

johncassell

Hello, Is there anyway to be able to unload a form by pressing the ESC
key.

Thanks

Joh
 
J

Jake Marx

Hi John,
Hello, Is there anyway to be able to unload a form by pressing the ESC
key.

Yes. If you have an existing "Cancel" button, set its Cancel property to
True. If you don't, you'll need to create a Cancel button and set its
Cancel property to True. Then put some code behind its Click event that
unloads or hides the userform.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 

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