Unlock Worksheet Vba. You aren't able to unlock the cells, even using VBA code, if the sheet is protected. Make a copy of the spreadsheet in an empty directory.
The VBA Code Snippets below show how to do most activities related to protecting and unprotecting sheets. Documents Similar To VBA Code to Unlock a Locked Excel Sheet. Worksheets are objects in a workbook's worksheet collection and they have Protect and Unprotect methods.
Open the worksheet you forget your password to.
Is there a way, using VBA in Excel to construct a macro that will turn the worksheet protection off, so Public Sub unlocksheet() 'unlock the worksheet.
Once in VBA double click the sheet you need to unlock from the menu listing on the left. Includes VBA code, macros, add-ins, free The following line of VBA code uses a For Next Loop to loop through each sheet in the active. Note, adjust cell references and alter User's name in the VBA code as needed.