View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Modell Modell is offline
external usenet poster
 
Posts: 16
Default password protect macro

Thanks Aidan. It works, but for some reason when I try to unprotect the
worksheet from Excel and put in the password it's telling me that my password
is incorrect. When I run the macro which protects and unprotects the
worksheet with the password it works fine. Any thoughts?

"AidanH" wrote:

should work fine - see

ActiveSheet.Protect Password = "FRED"
ActiveSheet.Unprotect Password = "FRED"


which (rather pointlessly) protects and unprotects a sheet without
doing anything else