• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

Problems with a carriage return delimited list

I have a text area that I have people paste multiple employee numbers from a spread sheet column. This equates to a one line per item list. Another forum user helped me by telling me that I could manipulate this text area as a list by using the Chr(13) variable which is the ascii eqivalent of a carriage return. Everthing works fine HOWEVER, there always seems to be a phantom item at the end of the list because the text area adds an extra carriage return to the end of the paste. If i paste 8 employee numbers, the listLen() will be 9. My logic told me to first Trim() the textarea before manipulating it as a list. Next, test the length and contents of each list item and if it was Len(listitem) of 0 and blank "" on the contents, I would do a listDelete at that spot. NO DICE. Any ideas?

0
Soulive
Asked:
Soulive
1 Solution
 
cheekycjCommented:
I think to cover all carriage returns (unix and windows)
use:
chr(10) and chr(13) as delimiters
0
 
SouliveAuthor Commented:
Well, I solved my own problem.  I simply did a ListChangeDelims(chr(13),",") and it didn't carry that last carriage return over as a list item.  
0
 
mrichmonCommented:
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation in the Cleanup topic area:

PAQ/Refund

Please leave any comments here within the next four days.

mrichmon
EE Cleanup Volunteer
0
 
Computer101Commented:
PAQed, with points refunded (100)

Computer101
E-E Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now