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:
Please let me know if you have any questions or suggestions![]()
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
Bookmarks