View Full Version : Execute Access Module within Excel
taporctv
06-21-2007, 08:11 AM
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?
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
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.