Run-time error 2485, running an Access macro from Excel

didi0531

New Member
Joined
Apr 1, 2016
Messages
1
Hi,

I try to run an Access macro from an Excel macro.
I've found some helping tips, but it still doesn't work.

The relating part:

Dim appAccess As Object
Set appAccess = CreateObject("Access.Application")
appAccess.opencurrentdatabase "G:\Risk Management\Common For Risk Management\Common\RPatadas\mlc08.accdb"
appAccess.Visible = True
appAccess.DoCmd.OpenForm "bank"

appAccess.DoCmd.RunMacro "start_all"
appAccess.CloseCurrentDatabase

MsgBox "Access is ready"

It opens the bank form, but does not run the start_all macro.

The error message is:
Run-time error '2485':
Microsoft Access cannot find the object 'start_all'

If I try to run it directly from Access, it works properly.

Thx for your replies!
Dori
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Welcome to the Board!

How do you run it from Access currently?
Is "start_all" the actual name of a Macro, or a Procedure/Function in VBA?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,435
Members
448,898
Latest member
dukenia71

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top