This element specifies the root tag in a Custom UI XML document.
Child Elements
xmlns reference
Excel 2010+ compatible, saved in customUI14.xml
.
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
Excel 2007 compatible, saved in customUI.xml
.
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
loadImage attribute
Specifies the name of a callback function to be called when the application needs to load an image for a control's icon.
For example, the LoadImageFunction
callback is called to load icon images:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" loadImage="LoadImageFunction">
onLoad attribute
Specifies the name of a callback function to be called when the Custom UI file is loaded by the application.
For example, the following XML code call the ribbonLoaded
function when the custom UI loaded:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="ribbonLoaded">
The ribbonLoaded
function in Excel standard module:
Option Explicit
Public MyRibbon As IRibbonUI
'Callback for customUI.onLoad
Sub ribbonLoaded(Ribbon As IRibbonUI)
Set MyRibbon = Ribbon
MyRibbon.ActivateTab ("customTab") 'Activate customTab tab
End Sub