RibbonXML =
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="ribbonLoaded">
<ribbon startFromScratch="false">
<tabs>
<tab id="DemoTab" label="LoadCustomUI Demo" visible = "true">
</tab>
</tabs>
</ribbon>
</customUI>
in MS Access I have this for the Callback for the ribbonLoaded
(I am sure my callback is where things are going wrong.)
Public Sub ribbonLoaded(ByVal RibbonUI As IRibbonUI)
gobjRibbon = RibbonUI
IRibbonUI.Invalidate
End Sub
Then to invalidate I am trying to use
Public Function Inval()
gobjRibbon.Invalidate
End Function
gobjRibbon is Public variant
(Public gobjRibbon)
Thank you for your help with this, it's been keeping me up late at
night.
The Error Message I get when trying to invalidate is
424 : Object Required.
Public gobjRibbon As IRibbonUI
Public Sub ribbonLoaded(ByVal Ribbon As IRibbonUI)
Set gobjRibbon = Ribbon
End Sub
Public Function Inval()
gobjRibbon.Invalidate
End Function
--
Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com
"Anthos" wrote in message:
news:1166732831.1...@i12g2000cwa.googlegroups.com...
I must be missing something though, becuase my understanding is that if
I invalidate a Ribbon, then it no longer exists, and I can rebuild it.
(making it dynamic)
Yet when I invalidate my ribbon in this instance, and then try and
re-apply it to a form, there is no change.
I run Inval then I run Application.LoadCustomUI "Testing", XML it tells
me the ribbon is already loaded.
Am I missing something?
How do I rebuild a ribbon from scratch?
I haven't experimented yet with invalidating a whole ribbon.
I typically just invalidate a single control using the InvalidateControl technique:
gobjRibbon.InvalidateControl "ControlID"
--
Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com
"Anthos" wrote in message:
news:1166749795.5...@73g2000cwn.googlegroups.com...