Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

macro to open password protected file - want to include password

Status
Not open for further replies.

pendle666

Technical User
Jan 30, 2003
295
GB
Hello

I have written a macro to open an Excel 2010 spreadsheet which I use reguarly. This file is password protected and although I included the password in the recording, it's not in the macro.

What should I do next? Is it possible.

regards

Pendle
 
Code:
Workbooks.Open Filename:= "Z:\MyFile.xlsx", Password:= "MySecret"

there are many options available on the Open command:

[tt].Open(FileName, UpdateLinks, ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, Local, CorruptLoad)[/tt]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top