Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to check when the esc key is hit on an MSForm
in Excel. I used to do a lot of VB programming a long time ago with VB 2 & 3 I thought that all I had to do was check the value of keypress for the form. But I must be missing something. Does anyone have a quick snipet that checks to see if the esc key was pressed and calls the terminate or a close method for the form? Thanks. Tritan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can set the cancel property of a commandbutton to True and if escape is
pressed, the click event for that button will fire. Regards, Tom Ogilvy "Tritan" wrote in message ... I'm trying to check when the esc key is hit on an MSForm in Excel. I used to do a lot of VB programming a long time ago with VB 2 & 3 I thought that all I had to do was check the value of keypress for the form. But I must be missing something. Does anyone have a quick snipet that checks to see if the esc key was pressed and calls the terminate or a close method for the form? Thanks. Tritan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook_BeforeClose(Cancel As Boolean) - Cancel won't work | Setting up and Configuration of Excel | |||
Cancel/Exit Sub | Excel Discussion (Misc queries) | |||
Input Box Cancel | Excel Discussion (Misc queries) | |||
Cancel calculation | Excel Worksheet Functions | |||
can I cancel a save | Excel Discussion (Misc queries) |