LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Enable ESC to canel UserForm

I'd like to enable the Escape key to cancel a userform. My form has a single
multipage control with two pages.

I have inserted a commandbutton with its Cancel property set to True and
have hidden the commandbutton by sending it behind the Multipage control.
Its Click event is:

Private Sub CommandButton1_Click()
Unload Me
Set frmInstructions = Nothing
End Sub

I encounter two problems with this: First, the Escape key unloads the form
only when the second page of the multipage is visible (I'd like Esc to cancel
the form at any point). Second, I can't select the button for editing after
it is hidden behind the multipage (need definitive selection method).

--
Thanks in Advance,
Jay
 
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 DO ENABLE ENABLE THE QUERY PARAMETER BUTTON? CPW Excel Worksheet Functions 1 January 21st 10 06:31 PM
VBA select default Don't Enable / Enable macros Setting BEEJAY Excel Programming 1 June 29th 06 08:45 PM
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM


All times are GMT +1. The time now is 05:30 AM.

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

About Us

"It's about Microsoft Excel"