Error in switchboard (opens macro that stats vba code)

  • Thread starter Thread starter Rolf76
  • Start date Start date
R

Rolf76

Guest
Hello,

(my first post so sorry if the title isn´t correct enough)

I have an Switchboard database that startsup several databases and runs macro´s and vba code.

With one database i get an error named: 2501 The action RunMacro has been Cancelled.

what I´ll do is the following:
-------------
Set appAccess = CreateObject("Access.Application")

appAccess.OpenCurrentDatabase "C:\CCCBos\CCCBos_Siebel\BR_Siebel_Template.mdb"


appAccess.DoCmd.RunMacro "ZZZ_Totaal"
appAccess.CloseCurrentDatabase
appAccess.Quit
Set appAccess = Nothing
---------------------
The Macro "ZZZ_Totaal" opens a private sub. When I run this macro manually (without the switchboard datatbase) it dont give the Error 2501

I dont understand the error.. It seemes that the vba codes ends correctly.

Anybody an idea?

Thanx in advance
 
You might be closing the database(at your end), before the code has been executed....
Might be worth closing the database in ZZZ_Totaal or incorperating the database in the Switchboard database...
 

Users who are viewing this thread

Back
Top Bottom