Running an agent from a different db using an action

Can you run an agent from a different database using an action formula?

Tried ToolsRunMacro after FileOpenDatabase and get the Agent does not exist message.

Thanks…

Subject: in LScript

Try this:

Forall a In srcDb.Agents

 If a.Name = sAgentName Then

  Set agent = a

  On Error 4000 Goto ERRORLABEL

  If agent.RunOnServer() = 0 Then

   On Error Goto 0

   msg = "END " & a.name & " ran successfully"

   Exit Forall

  Else

   On Error Goto 0

   msg = "END " & a.name & " ran with failure"

   Exit Forall

  End If

 End If

End Forall