View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Return boolean if sheet is currently protected

I want to Create a simple Sub that protects the sheet if it is not currently
protected, and unprotects the sheet if it is protected...
i.e.
Sub SheetProtect ()
If ActiveSheet.Protect = true then
ActiveSheet.Unprotect
Else
ActiveSheet.Protect
End If
End Sub

The part that I need help with is obviously the "If" argument.

Any help would be appreciative.