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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parsing multiline textbox

Status
Not open for further replies.

dmjarby

Technical User
Joined
Jan 10, 2004
Messages
46
Location
CA
I'm trying to parse individual lines from a multiline textbox by looping through all the text and doing a string search for a vbCRLF (ie. instr(vbCRLF,textbox1.text) but I can't seem to find the character that separates the lines?

Does anyone else have a solution?
 
Thanks Isadore. I was told to look at the string split method and ended up using something like:

dim strAnswers(100) as String
strAnswers = Replace(txtAnswers.Text, vbLf, "").Split(vbCr)


This snipet gives you clean results by removing all LFs and then splitting the string based on CRs into individual array elements.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top