I created a ribbon xml in Access 2010, one of the related element as follows:
<button id="button1" size="normal" label="Sample1" getImage="GetImage" onAction="OnMenuAction" />
I implemented OnAction in Main module as:
Public Sub GetImage(ByVal control As Office.IRibbonControl, ByRef image)
image = "HappyFace"
End Sub
Public Sub OnMenuAction(ByVal control As Office.IRibbonControl)
MsgBox "You've clicked the button " & control.ID & " on the Ribbon"
End Sub
The Tab did appear in ribbon, but without "HappyFace" image and shows error message:
"Access cannot run the macro or callback function 'GetImage'. Make sure the macro or function exists and takes the correct parameters."
When I click the button, Access also can't find the callbacks and shows the Message:
"Access cannot run the macro or callback function 'OnMenuAction'. Make sure the macro or function exists and takes the correct parameters."
My question is where should I put these callbacks besides Main module? Thank You.