ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unloading a form using the ESC key (https://www.excelbanter.com/excel-programming/337389-unloading-form-using-esc-key.html)

johncassell[_24_]

Unloading a form using the ESC key
 

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

Thanks

Joh

--
johncassel
-----------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...fo&userid=2501
View this thread: http://www.excelforum.com/showthread.php?threadid=39611


Jake Marx[_3_]

Unloading a form using the ESC key
 
Hi John,

johncassell wrote:
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]


johncassell[_25_]

Unloading a form using the ESC key
 

Cheers mate, much appreciated.


--
johncassell
------------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016
View this thread: http://www.excelforum.com/showthread...hreadid=396119



All times are GMT +1. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com