samedi 22 août 2020

VBA CheckBox_Change gets triggered by initializing the userform. How can I avoid this?

I wrote a code which adds +1 to a variable whenever a checkbox is "true" and -1 when it is "false". However, when I start the userform, all chkboxes are true as they should be but they all add +1 what they shouldn't do. So it starts with a counter too high as all checkboxes add 1. I want them to stay neutral UNTIL someone unclicks them. The number of checkboxes is unknown as there is more code so I can't set the counter at -4 for 4 checkboxes eg.

So basically I want them to ignore their initial value and get activated when they are manually clicked on. Any ideas?




Aucun commentaire:

Enregistrer un commentaire