Hello,
I am looking to find a simpler solution to "canceling" an update/click event of an Option Group control.
The option group is used only to set a tab control's value and display the correct page in the tab control.
The option group is a series of buttons that display a tab window page.
For example....
Code:Private Sub OpGroup_AfterUpdate() TabCtl = OpGroup. 'show the correct page End Sub
However, in this routine, if I want to cancel this action,
there is no way to "fully" cancel.
For example....
The above will obviously not switch the tab control.Code:Private Sub OpGroup_AfterUpdate() If SomeFunction() = true TabCtl = OpGroup. 'show the correct page Else 'CANCEL! End if End Sub
However, it will still change the Option Group control's value. I would like it to not change in this case and revert or remain to its original selection, should 'SomeFunction()' be false.
The only way to simulate this behavior (that I have found) is to go back and find the original option group button, based on the tab control and re-select it. This usually is done with a loop through the option group's controls collection, which albeit small, is ineffecient.
Does anyone else have a suggestion?
Thanks