Using DAO in VB to access a password proected Excel file


Posted by nicole on August 08, 2001 6:40 AM

Does any one know how to use the VB DAO OpenDatabase() command to open a password protected excel file ? I will know the passwird, I just can't figure out how to pass thw password to Excel using VB.

Thanks!



Posted by Joe Was on August 08, 2001 7:01 AM

Your Object.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="Your password"

This is the Password VB code, how to work it into the DOA wizzard I don't know? JSW