Computer Aided Automation

Full Version: Protect excel sheet with VBA
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Protect excel sheet with VBA


Code:
Protect the sheet by VBA
Sub UnProtect_Modify_Protect()
ThisWorkbook.Sheets("Costing").Protect Password:="abc123", UserInterfaceOnly:=True
'Unprotect
End Sub

Call UnProtect_Modify_Protect