|
-
Jul 9th, 2009, 07:36 AM
#1
Thread Starter
New Member
purpose of vbCrLf
what is the purpose of vbcrlf
-
Jul 9th, 2009, 07:42 AM
#2
Re: purpose of vbCrLf
It is a predefined constant you can use. It is more convenient to use than Chr$(13) & Chr$(10) - CR = 13, LF = 10. However, vbNewLine is a slightly faster alternative (for an unknown reason). vbCrLf can be considered more readable in other situations (it tells what characters are being added) while vbNewLine may be better in others (it tells that a line changes). In the end you can just use whichever one you find more convenient.
-
Jul 9th, 2009, 07:43 AM
#3
Re: purpose of vbCrLf
It's a VBA's constant that adds Carriage Return + Line Feed to some string.
You may also use vbNewLine wich is cross platform constant.
-
Jul 9th, 2009, 10:07 AM
#4
Fanatic Member
Re: purpose of vbCrLf
 Originally Posted by preetesh
what is the purpose of vbcrlf
In other words, the text that comes after it will be "written" in a new row 
Code:
Debug.Print "First row" & VbCrLf & "Second Row" & VbCrLf & "Third row"
will output
Code:
First row
Second Row
Third row
-
Jul 11th, 2009, 03:57 AM
#5
Addicted Member
Re: purpose of vbCrLf
It can be quite useful when you want to display a multi-lined messagebox.
-
Feb 10th, 2010, 01:45 PM
#6
New Member
Re: purpose of vbCrLf
All is fun and games til you try that code and it doesn't work and you wonder why? Then you figure out that you have to turn the Multiline property to true and not false. Hahaha.
Wouldn't it be nice if you have made a mistake in your life, you could just press Ctrl' Alt' Delete'!!!!
-
Feb 10th, 2010, 08:11 PM
#7
Re: purpose of vbCrLf
vbCrLf is also a command that must follow most Modem AT Commands.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Feb 10th, 2010, 10:07 PM
#8
Hyperactive Member
Re: purpose of vbCrLf
AS FAR AS I KNOW...IT IS USE FOR MAKING A NEWLINE..LIKE & VbCrlf & and so on..
~[L!f3 !s @ll @ab0ut l3@rn!ng]~
~*D0nt Give up, h0pe is always present*~
-
Feb 11th, 2010, 09:43 AM
#9
Re: purpose of vbCrLf
Interestingly, this command dates back to the Teletype Machine.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Feb 11th, 2010, 10:30 AM
#10
Re: purpose of vbCrLf
Bit of trivia -
CR = Carriage Return .... returns the carriage (think typewriters or teletypes) back to the beginning of the line... does not advance to the next line... which is why there is the...
LF = Line Feed ... advances the paper one line.... but does not return the carriage to the beginning of the line... which is why...
We have CRLF today... the two commands together return the carriage to the start position and then advance the paper one line.
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|