for --
mstr = mstr & newstr & "/n/t"
nest---
I want multi line string
like
newstr1
newstr2
newstr3
but above code gave
newstr1/n/tnewstr2/n/t/newstr3/n/t
How can i fix this problem?
Thanks.
Jeff
for --
mstr = mstr & newstr & "/n/t"
nest---
I want multi line string
like
newstr1
newstr2
newstr3
but above code gave
newstr1/n/tnewstr2/n/t/newstr3/n/t
How can i fix this problem?
Thanks.
Jeff
As I'm sure you have noticed, VB6/VBA does not support escape characters. This was introduced in .Net. You concatenate the line breaks in using character constants. The ones you are looking for are vbLf (Line Feed - ASCII 10), vbCr (Carriage Return - ASCII 13), & vbNewLine which is Char 13 then Char 10. If you are writing text files, or to text boxes you will generally want to use vbNewLine, if you writing to an excel cell then just use vbLf.
Cordially,
Aaron
Keep Our Board Clean!
- Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
- Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.
Thanks. Aaron!