I am trying to write a macro that opens a password protected workbook (password required to modify) and updates it with the latest set of data, then pulls the summary from that workbook into the current one. Both workbooks reside on the network and I am using excel 2007.
My code is:
Workbooks.Open Filename:= “my workbook file path”, WriteResPassword:=”my password”
I am getting a run time error ‘1004’: The password you specified is not correct. However the password is correct, the caps are not on and when I try to open the file manually with the same password it accepts it without any issues. I am stumped at what is causing this error and how I can bypass it. Any help on the matter will be greatly appreciated.
My code is:
Workbooks.Open Filename:= “my workbook file path”, WriteResPassword:=”my password”
I am getting a run time error ‘1004’: The password you specified is not correct. However the password is correct, the caps are not on and when I try to open the file manually with the same password it accepts it without any issues. I am stumped at what is causing this error and how I can bypass it. Any help on the matter will be greatly appreciated.