Microsoft Access VBA Macro Programming

(Tina Sui) #1
'Callback for id 3 onAction
Sub Action 3 (control as IRibbonControl)
End Sub

'Callback for id 4 onAction
Sub Action 4 (control as IRibbonControl)
End Sub

'Callback for id 5 onAction
Sub Action 5 (control as IRibbonControl)
End Sub

'Callback for id 6 onAction
Sub Action 6 (control as IRibbonControl)
End Sub

Enter the VBE window by pressingALT+F11and insert a module using Insert | Module
from the VBE menu. Copy and paste the callback code into your new module. You can now
enter your VBA code for the various actions. An example might be:

'Callback for id 1 onAction
Sub Action 1 (control as IRibbonControl)
MsgBox "You selected Option 1 "
End Sub

348 Microsoft Access 2010 VBA Macro Programming

Free download pdf