Your original problem, not being able to assign the value to the Title control, is probably caused by using the "+" operator to concatenate string expressions:
"varNumStr = varNumStr + varMsg"
Because the operands are (presumably) all Variants, which can take any kind of value, the compiler doesn't have any information about whether your "+" is an addition or a string concatenation operator. (For that matter, neither do I, but I'm assuming varMsg is text, and from that inferring that varNumStr is a "string form of a number" rather than a "number of stripes", for example.)
I believe the compiler has made its best guess and assumed the "+" was an addition operator. Then, during execution, it discovers that you're trying to make it do arithmetic on non-numeric strings, so it gives you an error.
Recommendations:
1. Always use the "&" operator for string concatenation. In old versions of Basic, "+" was the only string concatenation operator. "&" was invented as a replacement because of just this kind of problem. The only reason "+" is still allowed is for compatibility with old Basic code.
2. Use Variants only as a last resort, that is, when you need a variable to hold different data types. Variants are inefficient, because the compiled code has to constantly check what kind of data is in it this time. This makes your code larger and slower than it ought to be. It also causes this kind of problem, because you didn't have a well defined concept, when you wrote this code, of how the compiler would interpret it.
You can't access the Text property of a TextBox control unless that control has the focus. That's a consequence of a design decision made by Microsoft to conserve Windows resources. Rick Sprague