+ Reply to Thread
Results 1 to 5 of 5

Problem not wanting to open a file with modify file password...

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Problem not wanting to open a file with modify file password...

    Hi

    I have created a loop that opens all the Excel files in a directory, in order to make modifications to the ones that don't have passwords attached. I've been able to identify files with passwords when opening them and I am able to ignore them. However I have a problem with files with a 'modify file' password as the modify file dialog box appears. Is there anything I can do to use VBA to stop this dialog appearing as send keys don't seem to work (as you have to press Cancel on the dialog box first which defeats the purpose).

    Many thanks

    James

  2. #2
    Forum Contributor
    Join Date
    05-25-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Problem not wanting to open a file with modify file password...

    Application.DisplayAlerts = False - Could try that? Not sure if it would cause other problems for you though if you're using sendkeys on other parts of your code.

  3. #3
    Registered User
    Join Date
    08-06-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Problem not wanting to open a file with modify file password...

    Unfortunately already have that in my code

  4. #4
    Forum Contributor
    Join Date
    05-25-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Problem not wanting to open a file with modify file password...

    I'm a little confused what you mean by a "modify file password" - can you explain that a bit more? Are you talking about a sheet protection password, workbook protection password, windows secured password, etc?

  5. #5
    Registered User
    Join Date
    08-06-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Problem not wanting to open a file with modify file password...

    When you save an Excel file, under Options you can either password to open a file (to stop an unwanted user from opening a file) and/or password to modify a file (which allows a user to open a file but not save changes unless they have the password).

    Hope this helps

    James

+ 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