In VBA each variable declared on the same line needs to be given a datatype. In your declarations only the last variable on the line is typed. This results in all the other variables being assigned the default datstype of Variant.
So
Code:
Dim scriptName, str_prompt, str_lower1,…
Should be
Code:
Dim scriptName as String, str_prompt as String, str_lower1 as String,…