Splitting a string variable in a second line for listbox
Posted on 2004-10-23
I have a String variable called as "mess" and its assigned a very lengthy string. But the problem is when I add this "mess" to a listbox, not all portion is displayed. So how to make a part of that string variable to be displayed in second line? Can I use Split function? And also how to find the length of a variable or textbox ?
Let me paste a part of my code so that you will get a clearer idea of my part.
sql = "select * from Chatdata"
rs.Open sql, cn, adOpenDynamic, adLockOptimistic
Do While Not rs.EOF
If rs("duser") = frmLogin.gstrUsername Then
mess = rs("suser") & " tells you: " & rs("message")
So as you can see I am adding that "mess" variable to lstChat. So my goal is to check if "mess" has more than 80 characters and if so then extract characters above 80 and add them as a seperate list item. So any ideas? Thanks.