how to launch an access query / macro from excel ? (1 Viewer)

K

karibel

Guest
Hi,
I have linked a database from MS Access into Excel and i will need to re use it . i would like to be able to refresh the database from excel without having to go to Access and refresh it first.
would it be possible to launch an Access query/ Macro from excel?and how?
your help is greatly appreciated
thanks
 

yoritomo

Registered User.
Local time
Today, 23:31
Joined
Sep 5, 2005
Messages
40
Hi mate, this should work


Sub AccessTest1()
Dim A As Object
Application.DisplayAlerts = False
Set A = CreateObject("Access.Application")
A.Visible = False
A.OpenCurrentDatabase ("Path of your database")
A.DoCmd.RunMacro "Name of your macro"
Application.DisplayAlerts = True
End Sub
 
K

karibel

Guest
thank you

thanks yoritomo for your help
 

Users who are viewing this thread

Top Bottom