ADO Connection String

E

Ed

I get an error on this code that says MSAccess can not open the file. The
file does have user permissions associated with it, but I can open it
normally in windows.

If I copy the .xls file to my hard disk (no permissions) the code works
fine!

I tried putting in a User Id=sa; string but that gave me different errors.

What's the problem?

Dim cnn As New ADODB.Connection
On Error GoTo handler
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=Y:\PO\POLOG.xls;Extended Properties=Excel 8.0;"
cnn.Close
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top