Consulting

Results 1 to 2 of 2

Thread: Execute Access Module within Excel

  1. #1
    VBAX Regular
    Joined
    Jun 2007
    Posts
    58
    Location

    Execute Access Module within Excel

    I created an Access object within Excel but I dont know how to use this object to execute a procedure I wrote in Access. How would I go about doing this?

  2. #2
    Hi

    First add a reference to Microsoft Access 11 Object library

    Sub RunAccessProc()

    Dim myaccess As Object

    Set myaccess = CreateObject("Access.Application")

    myaccess.OpenCurrentDatabase ("C:\mydatabase.mdb")

    myaccess.Run "Procedure" 'name of procedure

    myaccess.Quit

    Set myaccess = Nothing

    End Sub


    regards
    qff

Posting Permissions

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