|
-
Jan 7th, 2012, 03:48 AM
#1
Re: vbNewLine
VB and VBA share common roots.
Mac editions of Office defined vbNewLine as CR or LF depending on the platform (Apple's old platform or the current BSD-derived platform). The point was to make the code portable, not the data files.
You could have a VBA macro in Excel that would process Windows data files on Windows and Mac data files on both flavors of Mac.
For whatever reason vbNewLine "runs faster" than vbCrLF in VB6 programs. It is also much better self-documentation to use vbNewLine when it represents a new line within text.
vbCrLf should basically never be used unless you want to force and imply that you are forcing CR/LF. A good example might be various Internet protocols, where by long-standing convention CR/LF is ALWAYS used as the "line delimiter" just as binary data ALWAYS uses big-endian order...
Except when people break the rules. The *nix johnnies have trashed the world in this regard. XML is fairly commonly shoveled across the 'Net using LF as new line. But you can't expect much from that lot anyway.
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
|