View Single Post
  #3   Report Post  
Posted to microsoft.public.office.developer.vba,microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.excel
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default password protect the button in Excel?

"cfman" wrote...
I have some buttons in my Excel files and assigned macro behind them.
I have add password protection to the VBA code so without password,
the users won't see the VBA code. But now my boss want even the
buttons to be password protected -- he doesn't want users to click on
the button and run the macro without permission.

....

Your boss shouldn't be having you do this in Excel or any other
spreadsheet if he's so concerned about security.

The only way to password protect buttons is to add code at the
beginning of the macros called by the buttons that would prompt the
user to enter the password, check if it's correct, and if so proceed,
but if not issue a warning and terminate immediately.