That depends what you mean. Splitting a line on commas is easy (using standard Split). If you have commas in the string that you don't want to split on but they are enclosed in quotes (for example abc,"a,b","cde,fg" being only 3 fields) then that also is easy and I have a routine that does that which you are welcome to.
Ian ----- Original Message ----- From: HouseDad To: [email protected] Sent: Tuesday, February 22, 2005 1:43 PM Subject: [vbhelp] Re: Re-inventing the Wheel --- In [email protected], "Ian Brooke" <[EMAIL PROTECTED]> wrote: > Hi, > The Line Input #n,aString command will read an entire line (as long as it's terminated by a CR/LF) even if it has commas in it. > > Ian Yes indeed, and I use it quite a bit. Unfortunately, it doesn't help me much when there are commas in the middle of the field. Unless, of course, there is a way to use SPLIT to read the line into an array, without those pesky commas in the middle of the field screwing the fields up. The only thing I have found so far is one guy said if you set a type up then input them all in the same line (ie input #1,a$,b$,C$) and delimit them without commas (ie "field 1""field2""field3") that it would ignore all the commas that way, but haven't tried that yet, and I don't think it's correct, judging from his example that was posted. I could erase the commas in an incoming files I guess (if there's quotes on either side of the comma then delete it), but I would like to get around that if possible. [C] '// ======================================================= 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 a.. To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] '// ======================================================= 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/
