phil152003
Board Regular
- Joined
- Mar 11, 2011
- Messages
- 89
I have a checkbox on a worksheet (inserted by using the control toolbox). The checkbox itself does exactly what I want it to.
However, I have a class module (taken from another website site and works 99% what I need it to, except for this problem I have), and part of the code needs to depend on what the value of the checkbox is.
For example,
the checkbox is called "checkbox1" on "sheet1".
In my Class Module, I want to say
If checkbox1 (on sheet1) = True Then
<TRUE scenario>
Else
<FALSE scenario>
End If.
However, I'm obviously not referring to the checkbox right as it always ends up in the false scenario, regardless of the value of the checkbox.
I'm very new to vba, so apologies if this is reasonably simple.
EDIT: I should say, that is obviously nothing like the actual code I'm using. Just a large simplification as to avoid over-complication of what I think is a simple issue.
However, I have a class module (taken from another website site and works 99% what I need it to, except for this problem I have), and part of the code needs to depend on what the value of the checkbox is.
For example,
the checkbox is called "checkbox1" on "sheet1".
In my Class Module, I want to say
If checkbox1 (on sheet1) = True Then
<TRUE scenario>
Else
<FALSE scenario>
End If.
However, I'm obviously not referring to the checkbox right as it always ends up in the false scenario, regardless of the value of the checkbox.
I'm very new to vba, so apologies if this is reasonably simple.
EDIT: I should say, that is obviously nothing like the actual code I'm using. Just a large simplification as to avoid over-complication of what I think is a simple issue.