Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to split file when the line return is not vbcrlf

Status
Not open for further replies.

bigracefan

Programmer
Joined
Apr 2, 2002
Messages
304
Location
US
I'm trying to split a file but when I use split(filename,vbcrlf) it doesn't split the file. When you hover over vbcrlf you see two squares. On my text file, where the line returns are is a single square. I've tried doing split(filename,mid(vbcrlf,1,1)), but this doesn't work. Is there a vbsomething to represent one of those squares?
 
Try vbLf (line feed) or vbCr (carriage return).

As an alternative, try reading the file using the Line Input command in VB as this will cope with vbCrLf or vbCr as the line break character and it avoids the need to use Split.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top