Dazzler 0 Posted August 26, 2011 People, I have an excel spreadsheet (2003). It is password protected for modify. I have achieved this by Tools->Options, Security tab, putting a password in 'Password to modify'. Save the sheet. When the sheet is re-opened, you are prompted for a password. This is ok. The problem is with: _excelbookopen I pass the password in the function but the prompt for password still opens. I need the sheet to open without the prompt. $excel = _excelbookopen($full_path, 1, false, "", "password") What am I doing wrong? Share this post Link to post Share on other sites
shornw 3 Posted August 26, 2011 Just guessing here, but to start I would try (in case opening the file sees Read before Write): $excel = _excelbookopen($full_path, 1, false, "password", "password") What version of Excel btw [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Share this post Link to post Share on other sites
hannes08 39 Posted August 26, 2011 $oEx = _ExcelBookOpen(@ScriptDir & "\test.xls", 1, False, "", "password2") This works fine for me (XP SP3 + Excel 2003) Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Share this post Link to post Share on other sites
Dazzler 0 Posted August 26, 2011 AHA! As yours worked, something is wrong with mine. Its an .xlsx. So there is conversion going on as you open and close; and this is clearly undermining the _excelbookopen. I resaved as .xls and it works a treat. Thank you people. Share this post Link to post Share on other sites
hannes08 39 Posted August 26, 2011 Glad I could help you to find the solution, though I wouldn't have guessed this solution. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Share this post Link to post Share on other sites