High everyone. First post .
I'm working with a form that has many checkboxes. Because of the interaction between these, I need to not have the checkbox code execute when I click another checkbox that changes the value of the first checkbox. So I've created another variable and test it when the checkbox click event is fired. If I didn't click the checkbox, but it's being changed by another checkbox _Click routine, no code is executed.. thus nullifying the fact that the event is firing when I change the value.
The problem I'm having is declaring the variable when I initiate the form. It seems like the code within the
Private Sub CheckBox1_Click()
End Sub
cannot see the value of the variable. I get no error messages, but instead generate infinite loops that execute between two checkboxes which are changing each other's values. When I initiate the variable in a module, it works without a problem. However, since I don't use the variable anywhere else except in that form, it would make more sense to me to
dim clicked = boolean
clicked = false
When I actually create the form, use it while the form is open, then have it destruct when I close the form. So the issue is scope.
Any help appreciated. I've only been playing with excel for a few weeks, so of course I have a million newbie questions, this being the first . Using Excel 2016.
I'm working with a form that has many checkboxes. Because of the interaction between these, I need to not have the checkbox code execute when I click another checkbox that changes the value of the first checkbox. So I've created another variable and test it when the checkbox click event is fired. If I didn't click the checkbox, but it's being changed by another checkbox _Click routine, no code is executed.. thus nullifying the fact that the event is firing when I change the value.
The problem I'm having is declaring the variable when I initiate the form. It seems like the code within the
Private Sub CheckBox1_Click()
End Sub
cannot see the value of the variable. I get no error messages, but instead generate infinite loops that execute between two checkboxes which are changing each other's values. When I initiate the variable in a module, it works without a problem. However, since I don't use the variable anywhere else except in that form, it would make more sense to me to
dim clicked = boolean
clicked = false
When I actually create the form, use it while the form is open, then have it destruct when I close the form. So the issue is scope.
Any help appreciated. I've only been playing with excel for a few weeks, so of course I have a million newbie questions, this being the first . Using Excel 2016.