Hi Folks,
I hope someone can help me out?....
I'm puzzled as to how to get more than one line of text into a Message Box if this is possible.
Thanks
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Solved by jingyi.liu. Go to Solution.
For VB language, vbcrlf stands for carriage return, so you could try it as below:
My_Message="Line1"+vbCrLf+"Line2"
MessageBox.Show (My_Message, "My Message")
good luck!
Hi Fleagle8t,
In addition to jingyi.liu suggestion, you will often see & vblf & used to get the same result:
MessageBox.Show ("Line1" & vblf & "Line2", "My Message")
As as added note, I often like to use a space and underscore in the code to add a line return in the code, for example:
MessageBox.Show ("Some text here used for Line1" _
& vblf & "More text here used for Line2" _
& vblf & "More text here used for Line3" _
& vblf & "" _ 'nothing for line4
& vblf & "More text here used for Line5", "My Message")
Using vbNewLine will work also:
MessageBox.Show ("Some text here used for Line1" _ & vbNewLine & "More text here used for Line2" _ & vbNewLine & "More text here used for Line3" _ & vbNewLine & "" _ 'nothing for line4 & vbNewLine & "More text here used for Line5", "My Message")
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com