Here is a sample to unprotect a sheet and write some values and then protect the sheet again
Sub Unprotect_And_ThenProtect()
ActiveSheet.Unprotect
Range("A2").Value = Now()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
No comments:
Post a Comment