Results 1 to 2 of 2

Pasword Supplied not correct- VBA code error

Threaded View

  1. #1
    Registered User
    Join Date
    12-02-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Pasword Supplied not correct- VBA code error

    I have two workbooks, and in the workbook where the code is in (the codename of the sheet is "Sheet1") I run a code to transpose some values to another external workbook ( workbook "y" in this case with the "Changes" sheet).
    Everytime I try to open up that second workbook "y" after I execute this module, it ALWAYS prompts me with the following message when I try to open it for the first time without typing or click anything (it lets me enter in a password when I close this message box and retry to open Workbook "y"):

    "The password you supplied is not correct. Verify that the CAPS LOCK key is off and be sure to use the correct capitalization" (A Screenshot of the error msg box is below)
    error message.JPG


    This is the code I am running in the macro to execute the code:
    Sub SendChanges()
    
    Application.ScreenUpdating = False
    
    Set y = Workbooks.Open(Filename:="\FILEPATH\Database_IRR 200-2S New.xlsm", Password:="Swarf")
        
    With y     
            .Sheets("Changes").Range("F2:CI2") = Application.Transpose(Sheet1.Range("K30:K111"))
            .Sheets("Changes").Range("CM2") = Application.Transpose(Sheet1.Range("K115"))
    
         y.Password = "Swarf”     
         y.Save
         y.Close False
    
     End With
    
    Application.ScreenUpdating = True
    
    End Sub
    Please let me know if you have any questions or suggestions
    Last edited by Dreeen; 12-12-2019 at 04:31 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How can I Autoupdate Vlookup links when the other workbook is open?
    By Dreeen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-04-2019, 09:40 AM
  2. macro to autoupdate links
    By MOUNIR75 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2017, 08:34 AM
  3. [SOLVED] links to open closed workbook
    By kriminaal in forum Excel General
    Replies: 1
    Last Post: 07-09-2016, 09:52 AM
  4. [SOLVED] Workbook links causing linked workbook to open, but remain hidden
    By Rob T in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-20-2014, 06:24 AM
  5. Autoupdate Excel links in PowerPoint
    By jack_kaps in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-02-2012, 05:32 AM
  6. Don't update links on workbook open
    By dylanemcgregor in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-14-2009, 07:32 PM
  7. AutoUpdate Links
    By Cherokee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2006, 08:03 AM

Tags for this Thread

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