+ Reply to Thread
Results 1 to 6 of 6

Is a workbook password protected?

  1. #1
    Registered User
    Join Date
    06-19-2007
    Posts
    3

    Is a workbook password protected?

    Is it possible to programatically tell if a workbook is password protected before trying to open it?

    I am processing large numbers of workbooks and want to avoid the ones with passwords as the process pauses with the Excel password dialog.

    Any help would be greatly received.
    Cheers

  2. #2
    Forum Contributor Tarball's Avatar
    Join Date
    04-21-2007
    Location
    Atlanta, GA
    Posts
    166
    First let me say that I do not advocate breaking passwords, but this may be your only solution. A very well known author posted this link on his web site and as he states, this algorithm has been around a very long time and is well published. You might try this http://j-walk.com/ss/excel/faqs/pw.txt

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Is this what you mean?

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    06-19-2007
    Posts
    3
    Quote Originally Posted by royUK
    Is this what you mean?

    Please Login or Register  to view this content.
    Thanks Roy but doesn't this require the workbook to be open first ie the ActiveWorkbook? I am trying to determine if protected before trying to open it.

  5. #5
    Registered User
    Join Date
    06-19-2007
    Posts
    3
    Quote Originally Posted by Tarball
    First let me say that I do not advocate breaking passwords, but this may be your only solution. A very well known author posted this link on his web site and as he states, this algorithm has been around a very long time and is well published. You might try this http://j-walk.com/ss/excel/faqs/pw.txt
    Thanks Tarball, I'm with you on that and not sure I can blitz the password that might be on the workbook. Thanks for the suggestion though.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I don't think you can test without opening. From what you said I thought you were using code to open the workbooks and process them. In which case you open the workbook, test the protection then continue according to the rsult.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1