Carriage return in macros

M

Manu Palao

Hi
I would like to write a list of words on a TextBox of a UserForm; ho
can I specifiy the Carriage return character in the "TextBox.Text=
sentence?
Thanks!
 
C

Chip Pearson

Manu,

Try code like the following:

Me.TextBox1.MultiLine = True
Me.TextBox1.Text = "Line One" & vbNewLine & _
"Line Two" & vbNewLine & _
"Line Three"

For aesthetic reasons, you might want to use a ListBox control
rather than a TextBox control.



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top