Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() i want to close the userform if press the esc key. Current, the userform have many controls. in that case, even if any control has focus, i want to close the userform when the esc key pressed. *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Add a button to the form, and code like so
Private cmdEsc_Click() Unload Me End Sub and set the Cancel property of that button to True -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "x taol" wrote in message ... i want to close the userform if press the esc key. Current, the userform have many controls. in that case, even if any control has focus, i want to close the userform when the esc key pressed. *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() thanks bob. then, I will automate your source code. Private cmdEsc_Click() Unload Me End Sub my source code follow. with me.controls.add("forms.commandbutton.1") Left = 10 Top = 10 Width = 0 Height = 0 Cancel = True End With and then i don't know *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don't add the button dynamically, add it at design.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "x taol" wrote in message ... thanks bob. then, I will automate your source code. Private cmdEsc_Click() Unload Me End Sub my source code follow. with me.controls.add("forms.commandbutton.1") Left = 10 Top = 10 Width = 0 Height = 0 Cancel = True End With and then i don't know *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
making hotkey in textbox in userform | Excel Programming | |||
select [a1]cell when hotkey(ctrl+q) pressed, after userform load | Excel Programming | |||
Statement to give focus to a specific control on a UserForm? | Excel Programming | |||
Set Focus Problem for textbox control on multipage control | Excel Programming | |||
Focus on Control before UserForm(s) pop up | Excel Programming |