I am using this code for importing encrypted excel into access 2007:
xlApp.Workbooks.Open FileName:=dlgOpen.SelectedItems(i), PASSWORD:=strPasswd
It works nicely if I give the correct password, or nothing (I'll prompt user to enter the password again for they give a blank password), but not for wrong password, Access will prompt for error "1004", saying that the password is not correct, and ask for debug.
How can I change it so that it will reject user's entry and prompt for password again?
Thanks!