Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default using escape key to exit a userform

hello all, and thanks in advance for any help on this.

i have a userform that is modal. the user's would like
to be able to hit "esc" to exit it, along with using the
Cancel button. is this a problem with a modal form?

some info on the form:
no button on the form has cancel set to true.
the cancel button and the standard "close" button work
fine.
the form has a listbox, three buttons, and an optionbox
group. only slecting is done on the form, no typing done
by the user.

for some reason, KeyDown is never activated on the form.
nor is the keypress event. i was going to use those to
capture if the user pressed the escape key.

i am using Excel XP.

thanks again!

heidi

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default using escape key to exit a userform

Heidi


some info on the form:
no button on the form has cancel set to true.
the cancel button and the standard "close" button work
fine.
the form has a listbox, three buttons, and an optionbox
group. only slecting is done on the form, no typing done
by the user.


Setting the Close or Cancel button's Cancel property to True should do just
that, regardless of the modality.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com


  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default using escape key to exit a userform

setting the cancel button to true would make the Escape
key work??


-----Original Message-----
Heidi


some info on the form:
no button on the form has cancel set to true.
the cancel button and the standard "close" button work
fine.
the form has a listbox, three buttons, and an optionbox
group. only slecting is done on the form, no typing

done
by the user.


Setting the Close or Cancel button's Cancel property to

True should do just
that, regardless of the modality.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default using escape key to exit a userform

right you are!! now i feel silly!! i didn't even know
that is what that feature did.

thanks much!!


-----Original Message-----
Heidi


some info on the form:
no button on the form has cancel set to true.
the cancel button and the standard "close" button work
fine.
the form has a listbox, three buttons, and an optionbox
group. only slecting is done on the form, no typing

done
by the user.


Setting the Close or Cancel button's Cancel property to

True should do just
that, regardless of the modality.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com


.

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
How to get userform Cancel button to invoke Exit Sub in calling macro? Craig Remillard New Users to Excel 1 November 19th 09 03:55 AM
how do i make a button from a userform exit onto the document in . Pieface New Users to Excel 1 April 17th 07 07:35 PM
Disable Exit button on a UserForm Noemi Excel Discussion (Misc queries) 1 September 14th 06 09:37 PM
Opening a UserForm causes a crash in the Exit procedure (Which is never called) Brent McIntyre Excel Programming 0 May 12th 04 12:37 PM
Userform will not exit correctly Stuart[_5_] Excel Programming 2 August 27th 03 08:38 PM


All times are GMT +1. The time now is 09:47 AM.

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"