Page 1 of 1

Excel Open Password

Posted: Tue Mar 18, 2008 6:41 pm
by Jeff Barnes
Hi Everybody,

There is an option in Excel to use a password to OPEN an excel file.

How can I set this password from within FWH and how would I then use it to open the file once it is set?

Try

Posted: Wed Mar 19, 2008 1:22 am
by fleal

Posted: Wed Mar 19, 2008 12:38 pm
by Jeff Barnes
Excellent. Thanks fleal.

Now, how can I send then password when opening the file so the user does not have to enter it every time?

I found a post that mentions trying:

oExcel:WorkBooks:Open( cFileXls, , , , "password" )


But this did not work.

Any ideas?

Posted: Wed Mar 19, 2008 1:08 pm
by Jeff Barnes
I've got it working.

To send the password you need to do the following:

oExcel:WorkBooks:Open( cFile,0,.f.,5,"password" )