vbCRLF = chr(13) + chr(10) 
Author Message
 vbCRLF = chr(13) + chr(10)

Hi guys,

Is it using the vbCrLF is 100% equivalent to Chr(13) + Chr(10)
I need to make up a text file to transfer to another program. The
specification is to end each
line with a <CR> and <LF>



Thu, 12 Sep 2002 03:00:00 GMT  
 vbCRLF = chr(13) + chr(10)


Quote:

> Is it using the vbCrLF is 100% equivalent to Chr(13) + Chr(10)
> I need to make up a text file to transfer to another program. The
> specification is to end each
> line with a <CR> and <LF>

Yes, they are absolutely equivalent.

But: Note that the end-of-line characters vary by platform:
    PC   -   CR LF
    unix -   LF
    Mac -   CR

If it's possible that your code may be run on a Mac (VBA is available on
Macs) then you should use vbNewLine rather than vbCrLf, as it adapts itself
correctly to the platform.  I prefer it in all cases because the name is
perfect.

Bertie



Thu, 12 Sep 2002 03:00:00 GMT  
 vbCRLF = chr(13) + chr(10)
If you're processing the lines one at a time, the VB Print # statement will add the vbCrLf for you.

Print #iFile, "This" 'prints the word "This" plus vbCrLf
Print #iFile, "This"; 'prints the word "This" no vbCrLf (note the semicolon)


Quote:
> Hi guys,

> Is it using the vbCrLF is 100% equivalent to Chr(13) + Chr(10)
> I need to make up a text file to transfer to another program. The
> specification is to end each
> line with a <CR> and <LF>



Fri, 13 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. chr(10) and chr(13) in memofield gives |

2. Chr(10) & Chr(13)

3. Chr(10) and Chr(13) doesn't work

4. INPUT OR READ TO STRIP CHR(10) AND CHR(13)

5. What is chr$(13) + chr$(10)

6. Squares using vbCrLf or Chr(13)

7. is carriage return chr(13) or chr(32)

8. No Sentences in Title?! / No Chr(10) or Chr(13) in titles!!!

9. Global Const CR = chr$(13) + chr$(10) uh oh!?

10. chr(13) & chr(10) in a text box

11. Enter Parameter value CHR(13)

12. Appending chr(13) to a memo field?

 

 
Powered by phpBB® Forum Software