Showing posts with label VB Script to display text vertically. Show all posts
Showing posts with label VB Script to display text vertically. Show all posts

Tuesday, August 2, 2011

How to display a string(say for example "Quick Test Professional") vertically in a message box?

Dim MyString, MyVar, i, S

MyString="Quick Test Professional"

For i=1 to Len(MyString)

'Get a new character for each iteration into S

S=Mid(MyString, i, 1)

'Add a character to MyVar and then add a new line. VBCRLF stands for Visual Basic Carriage Return Line Feed

MyVar=MyVar & S & VbCrlf

Next

Msgbox MyVar