Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Use excel vba to Call macro from Access


Hi, guys,

I have a macro in Access which execute the query. I want to set up a
automatic file in excel so that I can call the macro in access as well
Any one can help me

--
ppyx
-----------------------------------------------------------------------
ppyxl's Profile: http://www.excelforum.com/member.php...fo&userid=3611
View this thread: http://www.excelforum.com/showthread.php?threadid=55887

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Use excel vba to Call macro from Access


No one has any idea?


--
ppyxl
------------------------------------------------------------------------
ppyxl's Profile: http://www.excelforum.com/member.php...o&userid=36116
View this thread: http://www.excelforum.com/showthread...hreadid=558875

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Use excel vba to Call macro from Access

Try code like the following. You'll need a reference to Access
(VBA, Tools menu, References).

Dim Acc As Access.Application
On Error Resume Next
Set Acc = GetObject(, "Access.Application")
If Acc Is Nothing Then
Set Acc = CreateObject("Access.Application")
If Acc Is Nothing Then
MsgBox "cannot get access"
Exit Sub
End If
End If
On Error GoTo 0

Acc.OpenCurrentDatabase "H:\db2.mdb"

Acc.Run "AAA"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"ppyxl"
wrote in message
...

Hi, guys,

I have a macro in Access which execute the query. I want to set
up an
automatic file in excel so that I can call the macro in access
as well.
Any one can help me?


--
ppyxl
------------------------------------------------------------------------
ppyxl's Profile:
http://www.excelforum.com/member.php...o&userid=36116
View this thread:
http://www.excelforum.com/showthread...hreadid=558875



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
macro in excel to call a access module to run. [email protected] Excel Discussion (Misc queries) 0 April 23rd 07 08:59 PM
Excel vba to call Access Macro ppyxl Excel Worksheet Functions 0 July 6th 06 02:42 PM
Excel vba to call Access Macro ppyxl Excel Discussion (Misc queries) 0 July 6th 06 02:41 PM
call excel macro from access banavas[_17_] Excel Programming 1 August 27th 04 02:24 PM
Call Access 2000 macro in Excel Peter Excel Programming 0 May 18th 04 04:29 PM


All times are GMT +1. The time now is 08:15 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"