PRMiller2
Technical User
- Jul 30, 2010
- 123
Hi all,
I have the following code:
The purpose of this code is to not allow both the tgbSnapReportsPrint and tgbSnapReportsPreview buttons to be in a state of "pressed" at the same time. If Print is pressed, then Preview should not be, and vice versa. The code does not fail on a debug/compile, and it does not error out during execution. However, the button that I wish to turn off remains in a pressed state unless I physically click on the button itself.
Any suggestions as to what I can do to fix this?
I have the following code:
Code:
Public gobjRibbon As IRibbonUI
Sub OnRibbonLoad(ribbon As IRibbonUI)
' Callbackname in XML File "onLoad"
Set gobjRibbon = ribbon
End Sub
Sub OnActionTglButton(control As IRibbonControl, pressed As Boolean)
'ToggleButton
' Callbackname in XML File "onAction"
Select Case control.id
Case "tgbSnapReportPrint"
' tabSnap.grpSnapReports
gobjRibbon.InvalidateControl ("tgbSnapReportsPreview")
Case "tgbSnapReportPreview"
' tabSnap.grpSnapReports
gobjRibbon.InvalidateControl ("tgbSnapReportsPrint")
End Select
End Sub
The purpose of this code is to not allow both the tgbSnapReportsPrint and tgbSnapReportsPreview buttons to be in a state of "pressed" at the same time. If Print is pressed, then Preview should not be, and vice versa. The code does not fail on a debug/compile, and it does not error out during execution. However, the button that I wish to turn off remains in a pressed state unless I physically click on the button itself.
Any suggestions as to what I can do to fix this?