Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Niklas
One way: Function IsLocked(wks As Worksheet) As Boolean IsLocked = wks.ProtectContents End Function -- HTH. Best wishes Harald Followup to newsgroup only please "Niklas" skrev i melding ... Hi What is the best way to find out if a Sheet is protected? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Grouping Function on protected sheet | Excel Discussion (Misc queries) | |||
INK Annotations function in a protected sheet | Excel Worksheet Functions | |||
Spellcheck function in Protected Sheet | Excel Worksheet Functions | |||
show all function with sheet protected | Excel Discussion (Misc queries) | |||
How to enable the sort function for a protected sheet | Excel Discussion (Misc queries) |