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
 
Top