dreen
Board Regular
- Joined
- Nov 20, 2019
- Messages
- 52
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).
"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)
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)
This is the code I am running in the macro to execute the code:
VBA 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