+ Reply to Thread
Results 1 to 9 of 9

Run a macro with ADODB record set

  1. #1
    Registered User
    Join Date
    05-21-2012
    Location
    Indy
    MS-Off Ver
    Excel 2010
    Posts
    33

    Run a macro with ADODB record set

    I'm using a ADODB record set in oder to open a password protected database. Now that the database is open, I need to run a macro. I can't seem to find how to do that. Is it even possible from a ADODB connection?

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Run a macro with ADODB record set

    ADO has nothing to do with opening Access which is what you need to do in order to run a macro. you'll need to automate the access application
    Please Login or Register  to view this content.
    for instance
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Run a macro with ADODB record set

    Not that I'm aware of, you would have to automate Access with Excel and create an instance of it. This does of course mean that all users of the excel workbook would need access installed.

  4. #4
    Registered User
    Join Date
    05-21-2012
    Location
    Indy
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Run a macro with ADODB record set

    The database is password protected. How can open it using your sample code?

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Run a macro with ADODB record set

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-21-2012
    Location
    Indy
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Run a macro with ADODB record set

    Thanks! I'll give it a try.

  7. #7
    Registered User
    Join Date
    05-21-2012
    Location
    Indy
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Run a macro with ADODB record set

    That worked perfectly! Thank you so much for your help.

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Run a macro with ADODB record set

    you're welcome :-)

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Run a macro with ADODB record set

    If you are satisfied with the solution(s) provided, please remember to mark your thread as Solved.
    New quick method:
    Select Thread Tools (above first post on page) -> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word "Title" you will see a dropdown with the words "No prefix".
    Change to "Solved"
    Click Save
    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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