How do make it a connection of Access Database from Excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello;
I am creating a connection of Acess Database from a VBA code in Excel, but I
have a problem. The data base has protected with password; I know the key
word, but I don't know how to write it in VBA. That do I make?

Greetings.
 
: Hello;
: I am creating a connection of Acess Database from a VBA code in Excel, but
I
: have a problem. The data base has protected with password; I know the key
: word, but I don't know how to write it in VBA. That do I make?
:
Here is some code I used in the past

Set cnnDB = New ADODB.Connection
With cnnDB
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Mode = adModeRead
.Properties("Jet OLEDB:Database Password") = "password"
.Open "\\MyDatabase"
End With

Paul D
 
Thanks PaulD, it's wonderful

¡¡¡Worked it perfectly!!!

Grettings.


Dennis.
 

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

Back
Top