View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Héctor Miguel Héctor Miguel is offline
external usenet poster
 
Posts: 434
Default How to know if a worksheet was unlocked

hi, Mathieu !

I have a worksheet containing many formulas. This worksheet is locked without any password.
Is there a way to see if somebody unlocked the worksheet to change formulas?
I want the user can unlock and lock back the worksheet, but I need a way to know it.


ActiveSheet.ProtectContents returns true/false according actual protection of active sheet (i.e.)

MsgBox "Active sheet is " & IIf(ActiveSheet.ProtectContents, "", "UN-") & "Protected"

question is: how/when/where/... do you plan to lock-back when the case is ?

hth,
hector.