You can do it one of two ways:

txtBox.text="First Line of text" &vbCrLf& "Second line goes here"

or you can replace the vbCrLf with the intrinsic constant "vbNewLine"
(without the quotes, of course).  "vbNewLine" combines the two
characters - carriage return and line feed (which are actually
backwards - the cariage return returns the cursor to the left margin,
the line feed moves the cursor down to the next line.  The "Carriage
return" got its name from the old typewriters where people actually
had to push the carriage with the paper back to the right so they
could type on the left.)  If you want to indent, you can use the
"Tab()" function - the only argument it takes is the number of spaces
to tab over.

Hope this helps!

Richard



--- In [email protected], "plasmacoder" <[EMAIL PROTECTED]> wrote:
> Anyone know how to get VB to line feed in a text box? I have tried 
> everything! I am using:
> 
>  txtbox1.text = "G01" 
> 
> That works for the first line, how do I position the cursor for the 
> second line?




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/k7folB/TM
--------------------------------------------------------------------~-> 


'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [email protected]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to