Quote Originally Posted by mikeyc1204
I think what he's trying to say is that when no is checked, the code will run as shown.

When yes is checked, whatever value is in the text box will become a new PERMANENT condition in the if statement. So if the user enters the value 590 in the textbox with yes checked, it will check for 590 this time and every other time the macro is run in the future.

Did I get that right?


If so, having your code append its own conditions seems like more trouble than its worth. You'd be better suited to make a table in a hidden sheet somewhere with all the lookup values and have your form add the new value to that table. Or you could use a named range that holds a comma separated string of all your lookup values. Or you could have the lookup values read from a text file, or... you get the drift.

If you're hellbent on having the conditions added permanently in the code for some reason, its definitely possible.

Search for "Programming the VBE" in this forum or Google. There are several ways to go about doing it, none of them very practical for your purposes.
Yes you are right, but since I'm a noob I will try to do the tables thing.