+ Reply to Thread
Results 1 to 3 of 3

Password protected

  1. #1
    Steve
    Guest

    Password protected

    Good day.

    I have a Excel file that links back to several other files. However, some
    of the other files are password protected. If I know the passwords, it is
    possible to pass those password using VBA and open my linked workbook without
    being prompted for a password?

    Each time I open the linked file I am asked for the passwords to the other
    files, but the users don't want that. They do want their files protected,
    however.

    Any ideas?


  2. #2
    sebastienm
    Guest

    RE: Password protected

    Hi Steve,
    Look in the online help for the Open method of the Workbooks collection, you
    can use the following parameters:
    "
    Password -- Optional Variant. A string that contains the password required
    to open a protected workbook. If this argument is omitted and the workbook
    requires a password, the user is prompted for the password.

    WriteResPassword -- Optional Variant. A string that contains the password
    required to write to a write-reserved workbook. If this argument is omitted
    and the workbook requires a password, the user will be prompted for the
    password.
    "

    so
    Workbooks.Open Filename:="C:\mybook.xls", password:="mypass" ,...
    --
    Regards,
    Sébastien
    <http://www.ondemandanalysis.com>


    "Steve" wrote:

    > Good day.
    >
    > I have a Excel file that links back to several other files. However, some
    > of the other files are password protected. If I know the passwords, it is
    > possible to pass those password using VBA and open my linked workbook without
    > being prompted for a password?
    >
    > Each time I open the linked file I am asked for the passwords to the other
    > files, but the users don't want that. They do want their files protected,
    > however.
    >
    > Any ideas?
    >


  3. #3
    Steve
    Guest

    RE: Password protected

    Sorry, let me rephrase the question. I don't want to open the linked files,
    I just don't want to see the password dialog come up for each file that is
    linked to this workbook. In other words, for each file that is linked to the
    main file, if the file is closed, I have to type the password just to get the
    files to link. I just want them to link without typing the password for each
    file. I know the passwords for each file and I want to use them in VBA to
    link the protected files, but not open them.

    Make sense?

    "sebastienm" wrote:

    > Hi Steve,
    > Look in the online help for the Open method of the Workbooks collection, you
    > can use the following parameters:
    > "
    > Password -- Optional Variant. A string that contains the password required
    > to open a protected workbook. If this argument is omitted and the workbook
    > requires a password, the user is prompted for the password.
    >
    > WriteResPassword -- Optional Variant. A string that contains the password
    > required to write to a write-reserved workbook. If this argument is omitted
    > and the workbook requires a password, the user will be prompted for the
    > password.
    > "
    >
    > so
    > Workbooks.Open Filename:="C:\mybook.xls", password:="mypass" ,...
    > --
    > Regards,
    > Sébastien
    > <http://www.ondemandanalysis.com>
    >
    >
    > "Steve" wrote:
    >
    > > Good day.
    > >
    > > I have a Excel file that links back to several other files. However, some
    > > of the other files are password protected. If I know the passwords, it is
    > > possible to pass those password using VBA and open my linked workbook without
    > > being prompted for a password?
    > >
    > > Each time I open the linked file I am asked for the passwords to the other
    > > files, but the users don't want that. They do want their files protected,
    > > however.
    > >
    > > Any ideas?
    > >


+ 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