This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Framework > ESRI.ArcGIS.Framework > Interfaces > IC > ICommandItem Interface > ICommandItem.Action Property (ArcObjects .NET 10.4 SDK) |
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;}
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.
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.