Is there a way to convert a string into an executable line of code?
something like:
Dim Line1 as String
Line1 = \"MsgBox (\"\"Hello\"\")\"
Execute Li
You didn't have to go through such extremes... as you are not actually dynamically executing code. The Controls() Property accepts a test string so you could have used any source including a much simpler table, or array.
The same thing could have been accomplished as in your initial example like so:
Dim Line1 as String
Line1 = "Hello"
MsgBox Line1