View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default VBA and Password Protection

worksheets("somesheetnamehere").protect password:="topsecret"

Todd from Gold River wrote:

I would like to protect worksheets with a password using a macro. Recording
the macro does not seem to install the password and the worksheet can be
unprotected. What needs to be added to the VBA code?

Thanks,


--

Dave Peterson