Well, I'd do it wherever it made sense depending on when I wanted it to take
effect. The Workbook_Open event would be the place if I wanted it to take
place immediately on opening the workbook. The effect of an OnKey is
Excel-wide though so if the user switched to another workbook Ctrl-d will be
dead there too. That is, unless you use other events like
Workbook_Deactivate to turn it off (and Workbook_Activate to set it back
on). It can get messy.
--
Jim
| Would you do this on Worksheet Open?
|
| "Jim Rech" wrote:
|
| > Use OnKey to assign a 'null' sub to a keystroke to kill it:
| >
| > Application.OnKey "^d", ""
| >
| > --
| > Jim
message
| > | > |I suspect I'd do this in the Workbook_Open event, but am not sure how.
| > Can
| > | someone assist?
| > |
| > | Thanks
| >
| >
| >