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

Please can someone help? I have a Macro in Access But I need to run it from
within Excel using VBA code.
Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Running A Access Macro From Excel

Hello Frank
Yes this is possible using OLE:
Requires a reference to Microsoft Access n.0 Object Library where n is
version number of Access
Dim ObjAcc As Access.Application
Set ObjAcc = CreateObject("Access.Application")
ObjAcc.OpenCurrentDatabase "D:\Mes
Documents\Pascal\Office\Access\DonneesNew.mdb"
ObjAcc.UserControl = True
AppActivate "Microsoft Access"
ObjAcc.Run ("MacroName")
Set ObjAcc = Nothing

HTH
Cordially
Pascal


"Frank" a écrit dans le message de
...
Please can someone help? I have a Macro in Access But I need to run it

from
within Excel using VBA code.
Is this possible?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Running A Access Macro From Excel

ActiveX component can't create object? is there another way of doing this.
Frank

"papou" wrote:

Hello Frank
Yes this is possible using OLE:
Requires a reference to Microsoft Access n.0 Object Library where n is
version number of Access
Dim ObjAcc As Access.Application
Set ObjAcc = CreateObject("Access.Application")
ObjAcc.OpenCurrentDatabase "D:\Mes
Documents\Pascal\Office\Access\DonneesNew.mdb"
ObjAcc.UserControl = True
AppActivate "Microsoft Access"
ObjAcc.Run ("MacroName")
Set ObjAcc = Nothing

HTH
Cordially
Pascal


"Frank" a écrit dans le message de
...
Please can someone help? I have a Macro in Access But I need to run it

from
within Excel using VBA code.
Is this possible?




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
Running Access-to-Excel Automation.... Bob Barnes Excel Discussion (Misc queries) 2 June 16th 06 08:57 PM
Running Macros in Access from Excel Simon Dowse Excel Programming 1 June 7th 04 03:48 PM
Running Access MAcros or VB modules in Excel Nick Excel Programming 0 October 28th 03 06:27 AM
"Programmatic Access to be Denied" displays when running macro on excel in XP Stephen Fong Excel Programming 3 October 21st 03 09:19 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 08:55 PM.

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

About Us

"It's about Microsoft Excel"