Access 2007 and the IRibbonUI object (Trying to Invalidate to force a refresh of RibbonX) - Re-Post

  • Thread starter Thread starter Anthos
  • Start date Start date
A

Anthos

I am having troubles invalidating a iRibbonUI object
Can someone please tell me what I am doing wrong.


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.
 
Thank you,
That did the trick

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?
 
Back
Top