K
KristelSmith
I'm using Excel 2007, but I want the code to be capable of being run
in 2003.
I have five Activex checkboxes and a non activex "go" button on an
excel sheet.
The "go" button is set to run what is in module 1. This part is
working.
What I want to do is setup 5 "if ... then" statements that are
independent of each other. I want the module 1 sub to do what it's
set to do (all working) and THEN evaluate whether a checkbox is true
or not. If it is true, I would like it to call the appropriate code
and run it.
So, for the first checkbox named work, I have put the code in a class
of it's own named class1 for now (not sure if that's where it
belongs).
What do I need to put in module 1(and declare) to evaluate the "work"
checkbox and call "class1" if the value is true and if false just move
onto the next checkbox?
In shorthand... under module 1, I want to do something like:
If work checkbox = true then run the class1 code
if next checkbox = true then run the class2 code
The code sitting in class1 works just fine when I have it under module
1 and no checkbox is being evaluated.
I can move it wherever it belongs, just not sure where that might
be.
The reason I want to call the code instead of adding it to the if then
statement is really because it's really long and I want to seperate it
for ease of adding to it later. Either way, I can't seem to get it to
evaluate a checkbox from the module... or even the worksheet when I
moved the code over there.
If this isn't clear, let me know.
in 2003.
I have five Activex checkboxes and a non activex "go" button on an
excel sheet.
The "go" button is set to run what is in module 1. This part is
working.
What I want to do is setup 5 "if ... then" statements that are
independent of each other. I want the module 1 sub to do what it's
set to do (all working) and THEN evaluate whether a checkbox is true
or not. If it is true, I would like it to call the appropriate code
and run it.
So, for the first checkbox named work, I have put the code in a class
of it's own named class1 for now (not sure if that's where it
belongs).
What do I need to put in module 1(and declare) to evaluate the "work"
checkbox and call "class1" if the value is true and if false just move
onto the next checkbox?
In shorthand... under module 1, I want to do something like:
If work checkbox = true then run the class1 code
if next checkbox = true then run the class2 code
The code sitting in class1 works just fine when I have it under module
1 and no checkbox is being evaluated.
I can move it wherever it belongs, just not sure where that might
be.
The reason I want to call the code instead of adding it to the if then
statement is really because it's really long and I want to seperate it
for ease of adding to it later. Either way, I can't seem to get it to
evaluate a checkbox from the module... or even the worksheet when I
moved the code over there.
If this isn't clear, let me know.