View Single Post
 
Old 02-23-2023, 12:24 PM
Ddadoo57 Ddadoo57 is offline Windows 11 Office 2021
Advanced Beginner
 
Join Date: Feb 2023
Posts: 90
Ddadoo57 is on a distinguished road
Default I lose my instance of IRibbonUI

Good evening,

In a custom bar in word, I have a group of 6 togglebuttons. It is only the button I click on that remains selected. I handled this with the getPressed and onAction callbacks.

My CustomUI is loaded as follows:

Public objRibbon As IRibbonUI
Sub R_OnLoad(ribbon As IRibbonUI)
Set objRibbon = ribbon

objRibbon.ActivateTab ("TC_Tab")
...
End Sub

Everything works fine, except that from time to time, I lose objRibbon, my instance of IRibbonUI, and a click on one of the togglbuttons causes an error 91 (object not defined)

Has anyone encountered this problem? Is there any way to write the object instance in memory?

Sincerely,
David


Translated with www.DeepL.com/Translator (free version)
Reply With Quote