Got around to looking at this but am still having issuesOriginally Posted by xld
![]()
I put the code;
[vba]Application.OnKey "^{c}", "doNothing"[/vba]
in the "workbook_open()" code
if the sub "donothing" does not exist then pressing ctrl & S brings up the message:
macro "doNothing" does not exist which shows using the ctrl key is looking for the sub
and nothing happens, which is what I want but without the message
When the "doNothing" macro exists using ctrl & S the workbook saves which is what I was trying to prevent.
Should the code in the workbook open be something like:![]()
[vba]Application.OnKey "^{c}", & 'any other key' "doNothing"[/vba]