Results 1 to 7 of 7

Thread: Run Access Macros From Excel Or Run A Macro In MS-Access From Excel VBA

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    Are you sure
    qry_MakeTrustTable_Adhoc exists as a Visual Basic macro within that database? If yes, try this

    Code:
    Dim strDatabasePath As String
    Dim appAccess As Access.Application
     
    strDatabasePath = "C:\Users\zachk\Desktop\Strats 2011.01.accdb"
    Set appAccess = New Access.Application
    With appAccess
        .OpenCurrentDatabase strDatabasePath
        .Run "qry_MakeTrustTable_Adhoc"
        .Quit
    End With
    Set appAccess = Nothing
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  2. #2
    Junior Member
    Join Date
    Aug 2019
    Posts
    1
    Rep Power
    0
    Well dear, I can help you out in knowing how to create macros in Access with 3 different ways and how to run it. I have read this article when I was stuck in some problem with my Access macros coding. it’s really very helpful post. So, I thought you might also get some help from it.

    SO TRY IT…!
    3 Quick Ways To Create Macro In MS Access 2010/2013/2016/2019 Database

Similar Threads

  1. Export data from Excel to Access Table (ADO) using VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 4
    Last Post: 02-24-2015, 07:53 PM
  2. Replies: 1
    Last Post: 06-18-2013, 07:46 AM
  3. Replies: 7
    Last Post: 05-09-2013, 11:16 PM
  4. Selecting workbook to run macro
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 2
    Last Post: 08-24-2012, 08:21 PM
  5. Click Run cycle
    By PcMax in forum Excel Help
    Replies: 6
    Last Post: 11-01-2011, 04:50 AM

Posting Permissions

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