Run Access Macro From Excel - VBA 
Author Message
 Run Access Macro From Excel - VBA

I am trying to run a Macro named Main that I have created
in Access from excel, using VBA. The code I am using is

Sub AccessTest1()
        Dim A As Object
        Set A = CreateObject("Access.Application")
        A.Visible = False
        A.OpenCurrentDatabase ("C:\mainCofAwork.mdb")
        A.Run "Main"
End Sub

The code runs until it Reaches the A.Run.
That is when I receive the following error message

You may have used the run method in Visual Basic but
entered an invalid procedure name,
or you used the run method without first opening a
database.*You tried to use the OpenModule
method, but you used an invalid procedure name.

Thanks for your help,


Mon, 03 Jan 2005 04:04:19 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Run Excel Macro through Access VBA

2. Excel VBA macro to run Access Report

3. Running excel add-in (added into excel - not access) in Access VBA

4. Opening an excel file through a form/running excel macros through access

5. Running a Word VBA sub/macro from Excel

6. VBA macro in Excel - running on a different computer gives me error 32811

7. Excel VBA macro won't Access Contact List

8. Exporting Using a VBA Macro from outlook to Access or Excel

9. Running Excel function from Access function/macro

10. How to Run an Excel Macro from Access

11. Running Excel Macros From Access 97

12. run excel macro from access 97 ?


Powered by phpBB® Forum Software