Hi Everyone,
I am trying to use VBA code to password protect a worksheet. The code I am using protects the sheet but doesn’t require a password to unprotect it. I thought I read somewhere that it is difficult (maybe impossible?) to password sheets using a macro. Can you tell me if the code I am using is correct or if indeed this isn’t doable in a macro? BTW, there are many worksheets in the file and my macro would password each one of them after it completes the other tasks in the macro.
ActiveSheet.Protect , Password:=”test”, DrawingObjects:=True, _
Contents:=True, Scenarios:=True
Help?
TIA