View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Protects running from VBA, but not from hot key

Any chance that you open another workbook in your macro?

And does your hotkey include the shift key?

If yes to both, then remove the shift key from the hot key.

If you open a workbook with the shift key held down, then excel thinks you don't
want to run the auto_open or workbook_open procedures.

And since your shortcut key includes the shift key, it's confusing excel and
excel thinks you want to stop.

Andyjim wrote:

Macro protects workbook as its last command. It works when I run the macro
from VBA. But when I run the same macro from a hot key, it runs without error
but the workbook is not protected. I'm stumped.


--

Dave Peterson