Another bit of info to be aware of is the use of "Chr(10)" which is the carriage return character.
This can be used for a Message Box, as follows:
Sub Message_Box2()
text1 = "Line 1" & Chr(10) & "Line 2"
MsgBox text1
End Sub
But it can ALSO be used if you ever want to do a Search & Replace to remove carriage returns from multiple text boxes.
This situation came up in a previous posting where I had recommended the following routine, which will eliminate carriage returns in whatever range is highlighted.
Sub Remove_Carriage_Returns()
Selection.Replace What:="" & Chr(10) & "", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub
However, in re-reading your description, I now see that you are referring to forcing a carriage return in a "text box".
Therefore, you possibly are only wanting to know the "manual" method of forcing a carriage return.
This is done by simply... holding down the <Shift> key and hitting <Enter>.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.