Consulting

Results 1 to 3 of 3

Thread: Excel Password to modify in Macro...

  1. #1
    VBAX Regular
    Joined
    Jul 2005
    Posts
    9
    Location

    Excel Password to modify in Macro...

    Hello

    The following works on files that require a password to open, but not on files that require a password to modify.

    Workbooks.Open Filename:= _
            "C:\Documents and Settings\408460\Desktop\Testing Doc.xls" _
            , Password:="testing"
    End Sub

    Can anyone correct my syntax so that I can open a file with a password to modify? Thanks for your help!
    Last edited by Aussiebear; 04-27-2023 at 07:52 PM. Reason: Adjusted the code tags

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    WriteResPassword:="testing"
    Use that Argument in the Workbooks.Open statement.
    Last edited by Aussiebear; 04-27-2023 at 07:52 PM. Reason: Adjusted the code tags

  3. #3
    VBAX Regular
    Joined
    Jul 2005
    Posts
    9
    Location
    Thanks for your help!

Posting Permissions

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