If that is what you want try this:
Sub ToggleProtect()
    If Sheets("Sheet1").ProtectContents = True Then
 
    Else
        Sheets("Sheet1").Protect Password = "PASSWORD"
    End If
End Sub