sashapixie
Registered User.
- Local time
- Today, 01:49
- Joined
- Sep 30, 2015
- Messages
- 27
Hi There
I am new to XML and have created a custom ribbon with an action button as a test before I create my own specific tabs and buttons, using the XML below:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="MyTab1" label="My Tab 1">
<group id="MyGroup1" label="My Group">
<button id="MijnButton1" size="large" label="Print Large"
imageMso="PrintDialogAccess" onAction="MyCallBackOnAction"/>
</group>
</tab>
<tab id="MyTab2" label="My Tab 2"/>
<tab id="MyTab3" label="My Tab 3"/>
</tabs>
</ribbon>
</customUI>
I have the vba in a module to create a message box, the code is below:
[FONT=Calibri,Bold][FONT=Calibri,Bold][FONT=Calibri,Bold]
[/FONT][/FONT][/FONT]
However when I click on my button in my ribbon I get the following error
Priddy cannot run the macro or callback function "MyCallBackOnAction".
Makes sure the macro or function exists and takes the correct parameters.
(Priddy is the name of my database)
As this is my first attempt I have no idea why this does not work.
Any help is appreciated.
I am new to XML and have created a custom ribbon with an action button as a test before I create my own specific tabs and buttons, using the XML below:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="MyTab1" label="My Tab 1">
<group id="MyGroup1" label="My Group">
<button id="MijnButton1" size="large" label="Print Large"
imageMso="PrintDialogAccess" onAction="MyCallBackOnAction"/>
</group>
</tab>
<tab id="MyTab2" label="My Tab 2"/>
<tab id="MyTab3" label="My Tab 3"/>
</tabs>
</ribbon>
</customUI>
I have the vba in a module to create a message box, the code is below:
[FONT=Calibri,Bold][FONT=Calibri,Bold][FONT=Calibri,Bold]
Public Sub MyCallBackOnAction(
[/FONT]
[/FONT]
[/FONT]control As IRibbonControl[FONT=Calibri,Bold][FONT=Calibri,Bold][FONT=Calibri,Bold])
MsgBox "Hello World", vbExclamation
End Sub[/FONT][/FONT][/FONT]
However when I click on my button in my ribbon I get the following error
Priddy cannot run the macro or callback function "MyCallBackOnAction".
Makes sure the macro or function exists and takes the correct parameters.
(Priddy is the name of my database)
As this is my first attempt I have no idea why this does not work.
Any help is appreciated.