Use an empty variable instead of ""
Uninitialized variables are set to a special value: empty. When empty is cast to a string it becomes "".
Contrived example (using z instead of ""):
s=InputBox(z)
For i=1To 5
For j=1To i
r=r&s
Next
MsgBox r
r=z
Next
For numeric types Empty is 0, and for booleans it is false. This can cut down on initialization code.
a=inputbox("Enter Starting Value")
b=a
while done=0
i=i+1
b=b*2
done=(b>10000 or i>10)
wend
msgbox "Your "&a&" rabbit(s) have turned into "&b&" rabbit(s) in "&i&" years."
MsgBox
s by replacing theMsgBox
s withWScript.Echo
s and running the VBScipt file in cmd.exe with CScript (CScript C:\filepath\file.vbs
) \$\endgroup\$<!-- language-all: lang-vb -->
\$\endgroup\$