B
Bruce
I want to store multiple values in Column A and VBA Conditional Code in
Column B. The Conditional Code is just text and is just stored on the
worksheet. When a macro is run and a variable equals the value in column A
then the code stored in Column B executes inside the macro. For example, A1
= "ALLEX" and B1 = "If Not Left(route,1) = "K" . So, when the macro runs and
checks to see if "ALLEX" is in Column A. If so ,then it will use the
associated Condition: If Not Left(route,1) = "K". directly in the Macro.
So, if both conditions are true, "ALLEX" is found and Not Left(route,1) =
"K", then do something. I could "hardwire" that conditon in the Macro, but
there can be many different Values in Column A with different conditions and
I want the ability for the User to add values / conditions thru a User Form
rather than directly updating the VBA Code.
Column B. The Conditional Code is just text and is just stored on the
worksheet. When a macro is run and a variable equals the value in column A
then the code stored in Column B executes inside the macro. For example, A1
= "ALLEX" and B1 = "If Not Left(route,1) = "K" . So, when the macro runs and
checks to see if "ALLEX" is in Column A. If so ,then it will use the
associated Condition: If Not Left(route,1) = "K". directly in the Macro.
So, if both conditions are true, "ALLEX" is found and Not Left(route,1) =
"K", then do something. I could "hardwire" that conditon in the Macro, but
there can be many different Values in Column A with different conditions and
I want the ability for the User to add values / conditions thru a User Form
rather than directly updating the VBA Code.