Hi all,
I am looking for some guidance on how to use toggle buttons effectively. Perhaps what I want to do can't be done with toggle buttons, or there may be a more appropriate control to use.
I currently have 3 toggle buttons. At any one given time, only one can be in a TRUE state. So, when the user presses one button setting it to true, the other remaining two must be put in a FALSE state.
This is what I started with. It caused catastrophic problems, putting Excel into an unrecoverable crash. I think it was put into an eternal loop with each change in toggle state changing the toggle state of the others and so on.
Can anyone suggest a way to effectively toggle the values of these controls in their different combinations.
My userform initializes these as:
I have used mbevents coding to suppress control events during userform initialization in the past. The state of mbevents at the start of the initialization is false, meaning any control changes are executed during initialization. When mbevents = true, the current control change is suppressed with 'if mbevents then exit sub'
I'm not sure if this the approach or not, as I have yet to make it effectively work with my trials.
Bookmarks