Esc Key Macro instead of Ctrl+...
You can use application.onkey to reassign that key. But remember, it won't do
anything while you're editting a cell.
Option Explicit
Sub testme01A()
Application.OnKey "{Escape}", "Testme01B"
End Sub
Sub testme01B()
MsgBox "you hit escape"
End Sub
Sub testme01C()
Application.OnKey "{Escape}"
End Sub
The top procedure turns it on and the bottom turns it back to normal.
Dajana wrote:
I have written a macro that automatically hides the sheet when Ctrl+a is
pressed. However I would like to know if it is possible to write a program
that would allow me to use Esc instead of Ctrl+a.
Thanks
Dajana
--
Dave Peterson
|