Why doesn't OnKey work?
Just an added thought, all the code should be in a general module, not in a
worksheet or the thisworkbook module.
--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
Sub doit()
Dim aa
aa = aa
MsgBox "In Doit"
End Sub
Sub setit()
Application.OnKey "^s", "doit"
End Sub
Sub Unsetit()
Application.OnKey "^s"
End Sub
worked fine for me.
--
Regards,
Tom Ogilvy
"Mike" wrote in message
...
I have the following two subs below. From the help files, it's my
understanding that after running sub "setit", I should be able to do a
"Control s" and then sub "doit" will be called. It doesn't work. I have
Excel 2003. Am I misunderstanding the usage of ONKEY or what am I doing
wrong??
Thanks for any help
Sub doit()
Dim aa
aa = aa
End Sub
Sub setit()
Application.OnKey "^s", "doit"
End Sub
|