• Macro Password Protect Doesn’t Work (Excel 97 SR2)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Macro Password Protect Doesn’t Work (Excel 97 SR2)

    Author
    Topic
    #379426

    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

    Viewing 0 reply threads
    Author
    Replies
    Viewing 0 reply threads
    Reply To: Macro Password Protect Doesn’t Work (Excel 97 SR2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: