This document is archived and information here might be outdated.  Recommended version.


ICommandItem.Action Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Framework)  

ICommandItem.Action Property

The name of the VBA macro this command should run when pressed.

[Visual Basic .NET]
Public Property Action As String
[C#]
public string Action {get; set;}

Product Availability

Available with ArcGIS Desktop.

Description

Action is a string representing the full name of the VBA macro that is to be executed when the command item is clicked. The name of the macro must include the name of the VBA project in which this macro is located.

Remarks

Here are some examples of the syntax of the value for the Action property.

Macro called MyMacro in ThisDocument in Normal template:
"Normal.ThisDocument.MyMacro"

Macro called MyMacro in Module1 in Normal template:
"Normal.Module1.MyMacro"

Macro called MyMacro in ThisDocument in the current document:
"Project.ThisDocument.MyMacro"

Macro called MyMacro in Module1 in the current document:
"Project.Module1.MyMacro"

Macro called MyMacro in ThisDocument in a base template:
"TemplateProject.ThisDocument.MyMacro"

Macro called MyMacro in Module1 in a base template:
"TemplateProject.Module1.MyMacro"

 

Note: This property only applies to macro items.

See Also

ICommandItem Interface