Hi All,
I'm trying to learn VBA but i need a little help
I'm trying to check whether a worksheet is protected and return a value of "True" or "False" in a cell on a different worksheet. I also need the result to be always live/up to date.
This is what I have so far. Any help would be greatly appreciated.
Thank you
I'm trying to learn VBA but i need a little help
I'm trying to check whether a worksheet is protected and return a value of "True" or "False" in a cell on a different worksheet. I also need the result to be always live/up to date.
This is what I have so far. Any help would be greatly appreciated.
Code:
Private Sub Worksheet_CheckProtect()
If TargetSheet.ProtectContents = True Then
Worksheets("Dashboard").Range("B4") = "True"
Else
Worksheets("Dashboard").Range("B4") = "False"
End If
End Sub
Thank you