Ribbon Toggle Button

AstonCheah

Registered User.
Local time
Tomorrow, 03:07
Joined
Jul 31, 2008
Messages
23
Hi all, need some help here, i have created 1 ribbon toggle button and i want my form's timer to detect the toggle button value(true or false) in every 30 sec. how can i do it correctly? thanks.
 
Use the OnTimer event in your form and set the time to 30 seconds which is 3000 (I think)
 
if i use form's toggle button, that should be ok but for ribbon toggle button, it doesn't work. the vba will not read the ribbon toggle button value. that must be something i'm missing..
 
Hi

I did this a while ago. Vba won't check the ribbon value but it will check the ribbon callback value. What are you doing to check the toggle in the first place?

The callback reads the ribbon value and stores it in a public variable. This stays as long as the db is open unless you store the value in a table.

Another way is to have a hidden checkbox on the form that updates when the toggle updates and also updates the ribbon if clicked while testing to ensure both objects carry the same value. You can then use the forms timer event to check the checkbox rather than the ribbon. That works absolutely fine.


Regs

Nigel

p.s.
If you get stuck, give me a shout and I'll pop in a demo.
 
i use ribbon toggle instead of form's toggle button because is much simpler and more standardized to create (no need to set the size, location, font...) i want this button to run things automatically when it is true or false by the form timer. if there is no way to detect the ribbon value then i may take your idea to create a hidden check box or toggle button. pls help if it is possible to do so.
 
Hi Ashton,

here is a toggle example. it is set at 30 seconds then turns it off. im guessing that is what you wanted.

regs

Nigel
 

Attachments

Users who are viewing this thread

Back
Top Bottom