I have been stuck for a few days. I need to keep one of my excel spreadsheets password-protected however I also need to manipulate that file through a VB script. If I try to open it, the script hangs while waiting for me to enter the password... I don't mind having the password typed in clear in my vb script, but I have not been able to pass this password to Excel so far...

Can you help?

Here is part of my code:

Code:
	Set objWorkBook = objExcel.Workbooks.open(oFolder.path & "\" &  oFile.Name)

	objexcel.Visible = True 
	objWorkBook.Refreshall 
	objExcel.DisplayAlerts = FALSE	
	objWorkBook.Save
	objWorkBook.close true
I tried objWorkBook.Password = mypassword
and objExcel.Password = mypassword
and neither worked.

Thanks for any help!