Doesn't seem like a bug to me. You are setting the checked state and causing the event to fire again and again.
Make sure that the EventName of all toggle buttons is ToggleButtons.
Hello,
I know that I call the Event recursively, that's not related with my question, it seems you have read too fast.
My question is : why only one recursive call, even if i set "4" toggle buttons unchecked when i put one checked ?
Logically it must be 4 recursive calls, not 1.
In the Edit i was a bit tired because it's understandable, if all is good i don't set any other toggle button in an another state than which one is it at this time.
Then i don't change anything just i show a message to the user.
EDIT :
Grrrrrrrrr, after a good shower i realize that i give a response myself to my question with this reply !
One recursive callback because only one toggle button checked at anytime.
Like my grand mother say, tomorrow it's another day ............
Thanks for your code Erel, but it don't respond to my case, i have two series of 5 toggle buttons that i use like radio buttons in my application.
All toggle buttons can't have the same event.
Note : As mine your code don't avoid the recursive call, just it reject at first line of the Sub in "unchecked" case.
Best regards.