Vba Active Worksheet Unprotect. Protect UnProtect Worksheet in Excel VBA - Solution Here the left side part is the sheet which you want to protect. the first parameter will be password: you an provide any password to protect worksheet. Protect UserInterfaceOnly:=True Next x End Sub.
Unprotect workbooks, worksheets, and VBA code in XLSX and XLSM files. We can assign values to an active cell using VBA Active Cell function or fetch the address of the active cell. Find answers to Excel vba activesheet.protect/unprotect from the expert community at Experts Exchange. hi, Can any please tell me what exactly does activesheet.protect/unprotect doeS?
A string that specifies a case-sensitive password for the worksheet or workbook.
If the sheet or workbook isn't protected with a password, this argument is ignored.
Unprotect Password:=InputBox("Please enter the password") Exit Sub ErrHandler: MsgBox "Worksheet. By default, all cells are locked, but this does not take effect until you protect the worksheet. To unprotect a Worksheet without knowing the password, you must use a password recovery add-in.