Reputation: 111
I have an option group with toggle buttons within the group. If the toggle button is clicked the code works fine. But if the option group is clicked outside of the toggle button the code still fires. For example if the space between the toggle buttons is clicked, the On_click code still fires.
I would like to determine if a toggle button is clicked inside of the On_click event of the Option group. For example:
If ActiveControl.ControlType = acToggleButton Then
'Normal code...
Else
'Do nothing...
End If
This does not work because the active control is the Option group itself.
How can I determine if the toggle button within the option group is clicked?
Upvotes: 0
Views: 550
Reputation: 620
Each toggle button has a unique value so you could use the option group's After Update
or Before Update
event to catch a change.
Upvotes: 1