View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_6_] Otto Moehrbach[_6_] is offline
external usenet poster
 
Posts: 201
Default Detect Password Protection

Keith
Something like this perhaps:
Sub testme02()
Dim wks As Worksheet
Set wks = ActiveSheet
With wks
If .ProtectContents _
Or .ProtectDrawingObjects _
Or .ProtectScenarios Then
MsgBox "oh, oh. Somekind of protection"
End If
End With
End Sub

HTH Otto

"Keith Ralston" wrote in message
m...
Is there any way to detect when an XLS is password protected?