Quick VB Question for you VB gurus

puffpio

Golden Member
Dec 21, 1999
1,664
0
0
What do I use for a tab or newline in a String?

In C++ it's \t and \n...but what about VB?
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
VB can't interpolate newlines, tabs, etc. within a string in the same manner C++ can.

You'll need to do something like this:

yourString = "Following is a tab " & vbTab & ". Following is a newline & " vbCrLf

You can use the ascii counterparts as well, if you wish:

yourString = "Following is a tab " & Chr(9) & ". Following is a newline & " Chr(13) & Chr(10)