N
Niklas
Hi
What is the best way to find out if a Sheet is protected?
Is this a good way?
Public Function IsSheetProtected(i_wsSheet As Worksheet)
As Boolean
On Error Resume Next
'A dummy password to test if sheet is
protected...assume that no one have this password.
i_wsSheet.Unprotect
("NoOneIsAllowedToHaveThisPassword")
If (Err.Number <> 0) Then
IsSheetProtected = True
Else
IsSheetProtected = False
End If
End Function
Regards
/Niklas
What is the best way to find out if a Sheet is protected?
Is this a good way?
Public Function IsSheetProtected(i_wsSheet As Worksheet)
As Boolean
On Error Resume Next
'A dummy password to test if sheet is
protected...assume that no one have this password.
i_wsSheet.Unprotect
("NoOneIsAllowedToHaveThisPassword")
If (Err.Number <> 0) Then
IsSheetProtected = True
Else
IsSheetProtected = False
End If
End Function
Regards
/Niklas