Thanks, it doesn't quite cut it unfortunately...
Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$M$10" Then
If Target.Value > 0 Then
If ActiveSheet.ProtectContents Then
ActiveSheet.Unprotect Password:="TL1234"
Rows("18:20").EntireRow.Hidden = False
ActiveSheet.Protect Password:="TL1234"
End If
Else
If ActiveSheet.ProtectContents Then
ActiveSheet.Unprotect Password:="TL1234"
Rows("18:20").EntireRow.Hidden = True
ActiveSheet.Protect Password:="TL1234"
End If
End If
End If
End Sub
I tried some AI, because i want the sheet to be partially locked for users.
Can you see what might be wrong with this.. It doesn't seem to work?