Whats wrong with this ADO Connstring? Excel/VBA
Posted on 2004-08-02
Got a Excel spreadsheet here. Its password protected on a network drive.
Now ive read the MS article about password-protected Excel spreadsheets - and i have the Excel file opened. This according to Q211378 allows you to create datasets of data in a password protected Excel spreadsheet. However, i still get the 'Could not Decrypt File' message pop up when i try to access it in VBA via ADO.
Im using Access 2000 and im trying to populate a listbox with some data btw.
Set dbexcel = New ADODB.Connection
dbexcel.Open "DRIVER=Microsoft Excel Driver (*.xls);DBQ=" & strFileName & ";ReadOnly=1;PageTimeout=5000;MAXSCANROWS=0;IMEX=1;"