Results 1 to 1 of 1

VBA open Excel 2016 file with password

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-18-2011
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    105

    VBA open Excel 2016 file with password

    Hi all, having tried the below macro I still get asked to input password even though it's in the code not sure if its 2016 issue or the code?

    Sub OpenPass()
    '
     
     Set wbk = Workbooks.Open(Filename:="L:\General\Blue1920.xlsx", Password:=Password1)
     Set wbk = Workbooks.Open(Filename:="L:\General\Red1920.xlsx", Password:=Password1)
    
    End Sub
    Thanks

    Solution :
    Set wbPasteTo = Workbooks.Open(Filename:="L:\General\Blue1920.xlsx", Password:="Password1", WriteResPassword:="Password")
    Last edited by nd4spd; 08-02-2019 at 04:32 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Password Protected Excel File Need To Open
    By tariqjahangir in forum Excel General
    Replies: 1
    Last Post: 03-06-2019, 01:51 AM
  2. Excel 2016 file hangs on open
    By jonathanwsmith in forum Excel General
    Replies: 4
    Last Post: 04-23-2018, 12:52 PM
  3. Replies: 0
    Last Post: 02-23-2018, 12:35 PM
  4. Excel 2016 Mac - Open File Macro
    By DylanM in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-10-2016, 08:53 AM
  5. Replies: 3
    Last Post: 04-11-2014, 07:06 AM
  6. Replies: 0
    Last Post: 10-02-2013, 01:47 AM
  7. Replies: 0
    Last Post: 04-26-2006, 10:25 PM

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