Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Exit Sub | Excel Discussion (Misc queries) | |||
Exit when its a Mac | Excel Programming | |||
Exit when its a Mac | Excel Programming | |||
Form Exit Event | Excel Programming | |||
If a called sub exit, how to the caller exit right away? | Excel Programming |