I went to microsoft website and there doesn't appearr to be a password switch
see
http://office.microsoft.com/en-us/ex...0301033.aspx#4
Another solution would be to open another workbook with no password. In
this workbook put a Workbook_Open event. The workbook Open Event can open a
2nd workbook with a password.
"Paul Lambson" wrote:
> I am trying to create a .bat file to open a .xls file. But the file is
> password protected to modify. I can't figure out the code to enter the
> password in the .bat file and then hit the "OK" key
>
> start "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE"
> "W:\YIELDMGT\Paul Lambson\SAS\ThanksChart.xls"
> nircmd.exe dlg "password" click OK
>
> the first two lines get me to the prompt for the password but i'm
> stuck there
>
> HELP~~
>
> Paul
>