Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick question - Hard Return for Text Boxs in VBA 1

Status
Not open for further replies.

ordendelfai

Technical User
Nov 8, 2002
187
US
I am referencing a text box on a form that is very tall (or I could use a memo box as well).

I am passing a string to it's control source, as below:

MyTxtBox.ControlSource = "=""HI There"""

What I need to do is display the text on two lines in the text box (or memo box):

"Hi
There"

Instead of "Hi There"

Is there a vba character that will do this? (in the text box I can press "CTRL + Enter" and it works.

~Joel
As common courtesy and to help other members who might find your thread helpful in the future, please respond if the advice given resolved your issue.
 
Hi,
Code:
x = "Hi " & vbCrLf & "there"


Skip,

[glasses] [red]Be advised:[/red] It's been reported that a wee psychic is roaming the countryside.
Small Medium @ Large! [tongue]
 
THANKS! ;-)

~Joel
As common courtesy and to help other members who might find your thread helpful in the future, please respond if the advice given resolved your issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top