First, it is time to take this to a new thread. But second, WHEN is it red? At compile time? I believe I know why this happens, though.
You have two statements that appear to grossly violate VBA syntax rules for expressions.
After an IF ... THEN sequence, the next thing after THEN must be a valid statement or expression. At the beginning of a new line, you must also have a valid statement or expression. The two red lines are not valid because BOTH of them try to assign a value to a numeric constant.
You can say "22 = 1" all you want, but it won't happen. Ditto, "22 = varID" because you cannot assign a value to a constant. Not legal.
Perhaps you meant "ctl22" as the thing to which you were attempting to assign a value?
The "IsNothing" won't work that way either. IsNothing(22) will be false because 22 is not nothing. Did you mean to use ctl22 here, too?
When deciding there was nothing in the control, did you really mean IsNull or IsEmpty (both of which might be possible depending on what you meant?)