Open Workbook - Password

J

J.W. Aldridge

Got this macro, but it still prompts for password.


Any clues as to why?


Sub Macro7()
'
' Macro7 Macro


Workbooks.Open Filename:="X:\FHI Share\pcp\NEW PCP DATA.xls",
PASSWORD:="pcp123"


ActiveWorkbook.Save
ActiveWindow.Close


End Sub
 
A

AccessHelp

May be, the password for "NEW PCP DATA.xls" is not "pcp123". Are you sure it
is "pcp123"?
 
B

Bill Renaud

Does the workbook have passwords for both Open and Modify? If you entered
passwords for both, then your macro is only supplying the first one. You
may also need to supply the WriteResPassword parameter in the Open method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top