CommandExecute 事件

       

指定的命令执行后,该事件发生。如果要在某个特定命令执行后执行一组命令,则可使用该事件。

Private Sub Form_CommandBeforeExecute(ByVal Command As Variant)

Command   所执行的命令。

说明

OCCommandIdChartCommandIdEnumPivotCommandId 常量包含每个 Microsoft Office Web 组件的受支持命令的列表。

示例

下面的示例说明了捕获 CommandExecute 事件的子程序的语法。

Private Sub Form_CommandExecute(ByVal Command As Variant)
    MsgBox "The command specified by " _
        & Command.Name & " has been executed."
End Sub