G
GrannyM
I have a form with a multi-line textbox. After the user has entered in their
text, I need to know how many returns they've entered. I've been using text
with 5 lines (each with a hard return) for testing purposes, but have not
been able to find code that will tell me the user entered 5 hard returns.
Here is what I've tried and the values I get:
NumPara = InStr(1, searchtext$, chr(10)) - returns 30
NumPara = InStr(1, searchtext$, chr(11)) - returns 0
NumPara = InStr(1, searchtext$, chr(13)) - returns 29
NumPara = InStr(1, searchtext$, vbLf) - returns 30
NumPara = InStr(1, searchtext$, vbcr) - returns 29
NumPara = InStr(1, searchtext$, "^p") - returns 0
I've also tried "^11", "^13", "^10", and all return 0. I've tried
combining chr(13) & chr(10) and vbcrlf.
Anyone have any other ideas?
text, I need to know how many returns they've entered. I've been using text
with 5 lines (each with a hard return) for testing purposes, but have not
been able to find code that will tell me the user entered 5 hard returns.
Here is what I've tried and the values I get:
NumPara = InStr(1, searchtext$, chr(10)) - returns 30
NumPara = InStr(1, searchtext$, chr(11)) - returns 0
NumPara = InStr(1, searchtext$, chr(13)) - returns 29
NumPara = InStr(1, searchtext$, vbLf) - returns 30
NumPara = InStr(1, searchtext$, vbcr) - returns 29
NumPara = InStr(1, searchtext$, "^p") - returns 0
I've also tried "^11", "^13", "^10", and all return 0. I've tried
combining chr(13) & chr(10) and vbcrlf.
Anyone have any other ideas?