Hello!
I want to protect different cells from one of my sheets (tab) and the VBA code that I have is not working
Sub ProtectTheSheet()
Cells.Locked = False
Range("A2:A100,C2:C100,D2:D100,J2:J100,K2:K100").Locked = True
ActiveSheet.Protect
End Sub
Can you tell me where is the error!
I want to protect different cells from one of my sheets (tab) and the VBA code that I have is not working
Sub ProtectTheSheet()
Cells.Locked = False
Range("A2:A100,C2:C100,D2:D100,J2:J100,K2:K100").Locked = True
ActiveSheet.Protect
End Sub
Can you tell me where is the error!