Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detect Password Protection
Is there any way to detect when an XLS is password protected?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detect Password Protection
Can this be done before I attempt to open the spreadsheet?
I need to process a large number of XLS files. I want to note pwd protected files as exceptions. I am using Automation, not VBA as you have indicated below. Otto Moehrbach wrote: 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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detect Password Protection
Otto's code checks for worksheet protection. It kind of sounds like you want to
check for the file|open type of protection. I'm not sure how you're automating this (VB??), but if I were doing it in excel's VBA, I could do try to open it with a password of "" and if it failed, it had a real password: Here's a link that uses Excel to make a report for each workbook in a folder: http://groups.google.com/groups?thre...E05F%40msn.com Keith Ralston wrote: Can this be done before I attempt to open the spreadsheet? I need to process a large number of XLS files. I want to note pwd protected files as exceptions. I am using Automation, not VBA as you have indicated below. Otto Moehrbach wrote: 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? -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detect Password Protection
There is free utility to searche for password protected documents
(Word, Excel) on your computer http://lastbit.com/findpswdoc.asp Keith Ralston wrote in message om... Is there any way to detect when an XLS is password protected? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Password protection in macro ( Anybody can view my password in VB | Excel Discussion (Misc queries) | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
Password Protection | Excel Discussion (Misc queries) | |||
password protection | Excel Discussion (Misc queries) | |||
Detect Password Protection on a Sheet | Excel Programming |