+ Reply to Thread
Results 1 to 3 of 3

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

  1. #1
    Dennis
    Guest

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

    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.

  2. #2
    PaulD
    Guest

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


    "Dennis" <[email protected]> wrote in message
    news:[email protected]...
    : 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



  3. #3
    Dennis
    Guest

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

    Thanks PaulD, it's wonderful

    ¡¡¡Worked it perfectly!!!

    Grettings.


    Dennis.

    "PaulD" wrote:

    >
    > "Dennis" <[email protected]> wrote in message
    > news:[email protected]...
    > : 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
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1