VBA Compiler how to protect and unprotect Sheets

wkullek

New member
Hello,
what syntax does the VBA Compiler accept to protect and unprotect a sheet?
I get “Please open the VBA compiler of XLS Padlock and recompile your code.” with:
ActiveSheet.unprotect Password:=“xyz”
Thank you very much!
 
Last edited:
All access to Excel objects such as ActiveSheet must be preceded with Application.
Try
Application.ActiveSheet.unprotect("xyz")
 
Last edited:
Back
Top