I have a textbox with a lot off words and spaces with a length from about
200 charaters and spaces
i need to spilt them in lengths from about 50 chrs
i want to have a vbcrlf between this lengths
can someone thel my how to do that
Thanks in advance
Printable View
I have a textbox with a lot off words and spaces with a length from about
200 charaters and spaces
i need to spilt them in lengths from about 50 chrs
i want to have a vbcrlf between this lengths
can someone thel my how to do that
Thanks in advance
Use mid(stringname,1,50) to get splits of 50.
TO add the vbCrlf, simply put
finalstring = mid(stringname,1,50) & vbCrlf & mid(stringname,51,100) & vbCrlf & mid(stringname,101,150) & vbcrl & mid(stringname,151,200) & vbcrl
Now, you'll have to piece it together because I couldn't understand exactly what you're looking for.
You should also consider posting in the General VB forums. :)
Probably get more awnsers there..... :)
I think he wants lines of 50 characters in a textboxQuote:
Originally posted by mendhak
Now, you'll have to piece it together because I couldn't understand exactly what you're looking for.
Give him the answer, man.Quote:
Originally posted by Michael_Kamen
I think he wants lines of 50 characters in a textbox
For x = 1 to len(text) step 50
result = result & mid$(text,x,50) & vbnewline
next