View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joerg Joerg is offline
external usenet poster
 
Posts: 138
Default How do I lock VBA?

Why should Excel do this? If you have a second, not protected workbook open,
would you still want Excel to block access to the VBA editor? Makes no sense
to me.

If you want to prevent your users from viewing your code, password protect
your VBA code.
If you want to prevent the use of Alt-F11, you can use an OnKey method (e.g.
in your Auto_open macro) to reassign this key combination to something else
(or nothing at all). But be aware that user can still access the VBA editor
via the menu.

Cheers,

Joerg


wrote in message
...
After wb and sheets are protect Alt-F11 will still open my VBA window.
Is there a way to stop this from happening?

tia

jp