-
Jan
I was only talking about the way that a macro is "connected" via Callbacks to the Ribbon.
Each type of Ribbon control has it's own callback format that gets called (over simplifaction) when you select, click, or otherwise do something on the ribbon.
So when you have XML for a button control .....
[vba]
<button id="bWhite"
label="White"
showLabel="false"
onAction="ShadePressed"
image="White"
screentip="Clear background and borders from selected cells"
/>
[/vba]
.... clicking that control calls the onAction="ShadePressed" callback, passing the control bWhite ....
[vba]
Sub ShadePressed(control As IRibbonControl)
.....Your VBA here .....
End Sub
[/vba]
You still need the VBA to actually do things, but you can test the .ID attribute if you need to. I usually have the same callback Sub for multiple controls if there's a lot of common logic
Paul
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules