Reference Ribbon Control without callback

Engineer Joe

Well-known Member
Joined
Jun 10, 2005
Messages
549
I've seen alot of callback references to iribboncontrols. This basically means that the control has to be interacted with in order for a piece of VBA code to fire. Can you reference an iribboncontrol from a regular module...something where you just have a sub:


the top of my XML code in my UIeditor looks like this:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:Q="Excel 2007 VBA Prog Ref"
******="rxcustomUI_******">



I've tossed this into a regular module:

Dim moRibbon As IRibbonUI

Sub rxcustomUI_******(ribbon As IRibbonUI)

Set moRibbon = ribbon

End Sub


Sub ChangeToggleButton()

Dim QuickKeysToggleButtons As IRibbonControl

set QuickKeysToggleButtons = ?????????????

End Sub




I'd like to get the toggleButton as an object. Is this possible, or can i only refer to ribbon objects by callbacks???? IF I can only refer to them by callbacks, how can i change their attributes without the user interacting with them???
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
It's all done with smoke and mirrors and callbacks. You can find a lot of quality help on Ron de Bruin's web site (http://www.rondebruin.nl/tips.htm, scroll down to 'Excel 2007 Ribbon and QAT pages"), or if you prefer books, get the awesome one called RibbonX by Puls, Martin, and Hennig.
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,217
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top