OnKey when closing Workbook

R

RobC

I have a question when using the OnKey Method. I use the OnKey Method to
set Control p to activate my print macro. I enable it on Workbook Open and
Workbook Activate and Disable it on Workbook Deactivate and Workbook Before
Close. When I flip between Workbooks (mine and a blank), all works well.
My Macro runs in my Workbook and the normal Printer Dialog in the other
workbook. However when I close my workbook, and do a Control p in the
other workbook, it opens my workbook and asked if I want macros enabled.

To Activate I use - Application.OnKey "^p", "Print_Quote_Show"
To Deactivate I use - Application.OnKey "^p"

The Help claims that the latter is to return it to it's normal function but
doesn't appear to... Since ^p is a very common shortcut, I need it to exit
clean. Am I doing something wrong?

Thanks, Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top