CreganTur
06-17-2008, 12:18 PM
I've got a UserForm that makes use of a group of check boxes that will enter data into a form letter based on the User's choices.
There are 2 main checkboxes: "Reinstate" and "No Reinstatement." All of the checkboxes except for these 2 are .enabled = False when the UserForm Loads. if the User Selects "Reinstate" then everything remains exactly as it is. If the User selects "No Reinstatement" then the disabled checkboxes become .Enabled = True (and the Reinstatement checkbox is unchecked if it was previously checked).
I've noticed some very odd behavior occurring if I clicked on one, and then the other. I was forced to double-click on the checkboxes to actually set them to True. From stepping through the code I discovered that when, for example, "Reinstatement" changes the value of "No Reinstatement", that the code behind "No_Reinstatement_Click" would fire.
I've attached an example doc that shows exactly what's going on. Just click back and forth between "Reinstatement" and "No Reinstatement" and you'll see what I mean.
I want to know if there's a way to keep this from happening.
I did find a workaround- I changed "Reinstatment" and "No Reinstatement" to Option Buttons, instead of CheckBoxes. This stopped the problem I mention above... but I'd still like to know if there's a way to stop this from happening with the checkboxes.
TIA
There are 2 main checkboxes: "Reinstate" and "No Reinstatement." All of the checkboxes except for these 2 are .enabled = False when the UserForm Loads. if the User Selects "Reinstate" then everything remains exactly as it is. If the User selects "No Reinstatement" then the disabled checkboxes become .Enabled = True (and the Reinstatement checkbox is unchecked if it was previously checked).
I've noticed some very odd behavior occurring if I clicked on one, and then the other. I was forced to double-click on the checkboxes to actually set them to True. From stepping through the code I discovered that when, for example, "Reinstatement" changes the value of "No Reinstatement", that the code behind "No_Reinstatement_Click" would fire.
I've attached an example doc that shows exactly what's going on. Just click back and forth between "Reinstatement" and "No Reinstatement" and you'll see what I mean.
I want to know if there's a way to keep this from happening.
I did find a workaround- I changed "Reinstatment" and "No Reinstatement" to Option Buttons, instead of CheckBoxes. This stopped the problem I mention above... but I'd still like to know if there's a way to stop this from happening with the checkboxes.
TIA