PC Review


Reply
Thread Tools Rate Thread

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

 
 
Anthos
Guest
Posts: n/a
 
      21st Dec 2006
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.

 
Reply With Quote
 
 
 
 
Anthos
Guest
Posts: n/a
 
      21st Dec 2006
Previously Posted:
http://groups.google.com/group/Acces...7b944f21?hl=en.

 
Reply With Quote
 
Jeff Conrad
Guest
Posts: n/a
 
      21st Dec 2006
Try:

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/conrad...essjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

"Anthos" wrote in message:
news:(E-Mail Removed)...

>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.



 
Reply With Quote
 
Anthos
Guest
Posts: n/a
 
      22nd Dec 2006
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?


Jeff Conrad wrote:
> Try:
>
> 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/conrad...essjunkie.html
> Access 2007 Info: http://www.AccessJunkie.com
>
> "Anthos" wrote in message:
> news:(E-Mail Removed)...
>
> >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.


 
Reply With Quote
 
Jeff Conrad
Guest
Posts: n/a
 
      22nd Dec 2006
Hi Anthos,

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/conrad...essjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

"Anthos" wrote in message:
news:(E-Mail Removed)...

> 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?
>
>
> Jeff Conrad wrote:
>> Try:
>>
>> 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/conrad...essjunkie.html
>> Access 2007 Info: http://www.AccessJunkie.com
>>
>> "Anthos" wrote in message:
>> news:(E-Mail Removed)...
>>
>> >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.

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalidate .vs. Refresh ozbear Microsoft C# .NET 1 15th Feb 2010 08:10 AM
PPT 2007 VBA: How to force refresh of window? Dave Jenkins Microsoft Powerpoint 4 23rd Feb 2008 09:25 PM
iribbonui object not found, where can i define this object? =?Utf-8?B?THVpc28=?= Microsoft Access Form Coding 0 21st Oct 2007 05:36 PM
Custom RibbonX Reviewer for Access 2007 bazarov Microsoft Access Forms 0 20th Sep 2007 12:03 PM
RibbonX in Access 2007 Anthos Microsoft Access Forms 3 20th Feb 2007 10:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:46 PM.