Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Esc key to exit form


I have a form which has more than 20 controls on it. I want to enabl
user to press Esc key to exit the form. I know I can use KeyUP o
KeyPress event of a single control to do it. But since there are tw
many controls and it's messy and time consuming to code for each one o
them. Is there an easy way to acheive it?

Thanks

Huyeot

--
Huyeot
-----------------------------------------------------------------------
Huyeote's Profile: http://www.excelforum.com/member.php...fo&userid=1389
View this thread: http://www.excelforum.com/showthread.php?threadid=26831

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Esc key to exit form


Go to the properties of the close button on your form.
Set the Cancel property to true.

If the user presses escape.. the procedure attached to that
button is executed.
(see help on Msforms = Cancel property.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


Huyeote wrote:


I have a form which has more than 20 controls on it. I want to enable
user to press Esc key to exit the form. I know I can use KeyUP or
KeyPress event of a single control to do it. But since there are two
many controls and it's messy and time consuming to code for each one of
them. Is there an easy way to acheive it?

Thanks

Huyeote



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exit Sub Jeff Excel Discussion (Misc queries) 2 March 1st 08 06:21 PM
Exit when its a Mac Tushar Mehta Excel Programming 0 September 21st 04 03:41 PM
Exit when its a Mac jose luis Excel Programming 0 September 20th 04 10:47 PM
Form Exit Event JT[_2_] Excel Programming 1 September 17th 04 02:29 AM
If a called sub exit, how to the caller exit right away? luvgreen[_4_] Excel Programming 4 February 24th 04 05:06 PM


All times are GMT +1. The time now is 01:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"