hatman
Well-known Member
- Joined
- Apr 8, 2005
- Messages
- 2,664
For my Custom UI Ribbon, which needs to have controls invalidated occasionally, I used the following code, according to standard protocol:
The problem is that in my current version of the software, I seem to have at least one unhandled error (that none of my users are reporting, and I can't duplicate) that causes all of my globals to get cleared. While I can detect this, and re-assign all of my globals at the start of each entry-point, I can't see a way to do this for the RibbonUI object. I can display a messagebox before the Invalidate method is called and instruct the user to restart the application, so the error is handled with grace... but I'd like to handle the error invisibly by re-assigning the Custom Riboon to the RibbonUI object on teh fly.
Anybody else run into this? Anybody find a more robust solution than what I have in place now?
Code:
Global grxLabStatusRibbon As IRibbonUI
Sub Callback_LabStatusRibbon_******(ribbon As IRibbonUI)
SetActiveWindow Application.hwnd
Application.SendKeys "%HAM{RETURN}"
Set grxLabStatusRibbon = ribbon
End Sub
The problem is that in my current version of the software, I seem to have at least one unhandled error (that none of my users are reporting, and I can't duplicate) that causes all of my globals to get cleared. While I can detect this, and re-assign all of my globals at the start of each entry-point, I can't see a way to do this for the RibbonUI object. I can display a messagebox before the Invalidate method is called and instruct the user to restart the application, so the error is handled with grace... but I'd like to handle the error invisibly by re-assigning the Custom Riboon to the RibbonUI object on teh fly.
Anybody else run into this? Anybody find a more robust solution than what I have in place now?