Sie sind hier: Command - onAction
Command - onAction
Der Callback wird ausgeführt wenn auf das Ribbon Control geklickt wird.
Beispiel XML Ribbon Datei:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <commands> <command idMso="Cut" onAction="CallbackCut"/> <command idMso="Copy" onAction="CallbackCopy"/> </commands> </customUI>
Funktion in einem Standardmodul:
Sub CallbackCut(control As IRibbonControl, ByRef CancelDefault) MsgBox "Callback aufgerufen" CancelDefault = True End Sub Sub CallbackCopy(control As IRibbonControl, ByRef CancelDefault) MsgBox "Callback aufgerufen" CancelDefault = True End Sub