I have a VB6 application that processes Excel spreadsheets. I do not have any problems loading an unprotected Excel sheet using the following code...

ExcelApp.Workbooks.Open Filename:= <Path & Filename>

However, I have a problem loading a password-protected file using the following code...

ExcelApp.Workbooks.Open Filename:= <Path & Filename>, Password:=Password

where password is the correct password contained in a string variable Password

The system simply hangs up. I even tried putting quotes around the password...

ExcelApp.Workbooks.Open Filename:= <Path & Filename>, Password:=Chr(34) & Password & Chr(34)

and it still gets hung up. A Google search on the topic indicates that many have the same problem but could not find a solution. Any help would be appreciated.