Description

Runs a macro on the selection.

Return Type

A Long value.   A Long with count of the times the macro was run.
Failure Returns 0.

Failure conditions:
* No Selection.
* Macro does Not exist or its project is Not loaded.
* Macro is Not of prototype Sub Name() having no parameters.
* Macro dialog is closed without running the macro.

Syntax

object.RunMacro ([sFullyQualifiedMacro], [bNodeOpenFirst], [sDisplayName])

The RunMacro Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDataNodes.
sFullyQualifiedMacroOptional. A String value. The name of macro in format "ProjectName.ModuleName.ProcedureName" or VbNullChar to execute a registered macro command applicable to the Current named by sDisplayName.
bNodeOpenFirstOptional. A Boolean value. When True the NodeOpen method will be called prior to invoking the macro.
sDisplayNameOptional. A String value. An identifier specifying a particular McDataSource implementation.