View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Metallo[_4_] Metallo[_4_] is offline
external usenet poster
 
Posts: 21
Default PSW for Macro & Codes

Peter,

What you gave me is the final part.
What I need is to add a password in the code so that the user cannot
unprotect the sheets.
Then I will use the function you described to hide the password in the code.

Thanks
Alex

"Peter Beach" wrote in message
...
Hi Alex,

If by PSW you mean "password", go to the Project Explorer (normally docked
to the left-hand side of the screen) and right click with the mouse on the
VBA Project item and select Properties. A window will pop up, go to the
Protection Tab and set your password and enable protection.

HTH

Peter Beach

<snip

I want to add a PSW to avoid that the users do mistakes or changes in

the
WS

What is the code I can use to add the PSW and where shall I place it?

My intention is to use the VBA project properties to hide the PSW.

Thank you
Alex