Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Run Access Macro from Excel

I have code that runs a Access query on an Access DB when called from within
an Excel Application, but I am wondering if there is any way to run a Access
Macro.

Bascially all the Macro does is call 8 queries in turn. I know I could run
each of them from Excel, but I wonder if there is a way to utilise the macro
from Excel?

Paul Smith


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Run Access Macro from Excel


Hi Paul,

In Excel Visual Basic Editor you'll have to add a reference to the
Access Object Library: Tools References Microsoft Access Object Library

The general format is as follows:

Sub AccessMacro()

Dim ac As Access.Application
Set ac = New Access.Application

ac.Visible = True

ac.OpenAccessProject ("S:\FINOPS\Data\TransQuery.mdb")

ac.DoCmd.RunMacro "DailyImports"

ac.Quit

Set ac = Nothing

End Sub

Not really my macro. Copied pretty closely from Excel & Access
Integration by Michael Alexander. Hope it helps.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I run an access macro from excel? RocketMan Excel Programming 3 March 22nd 10 02:19 PM
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
Trigger a Macro in MS Access from an Excel Macro? DonRetd Excel Programming 13 March 30th 05 09:52 PM
Macro to get from excel into Access andycharger[_18_] Excel Programming 0 March 5th 04 10:00 AM
Launch Macro in Access via Macro running in Excel??? dgrant Excel Programming 1 September 24th 03 01:38 PM


All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"