Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding tab characters to text file

Status
Not open for further replies.

revilord

Programmer
Oct 2, 2003
64
I am simply trying to write a line of text to a file testfile.txt and put tabs in the line. How do I do this?

sample that doesn't work
a.Writeline("Add a tab between here " & "\t" & "and here")

 
[tt]a.Writeline "Add a tab between here " & vbTab & "and here"[/tt]

Also check out the vbCr, vbLf, vbCrLf, vbNewLine constants.

Roy-Vidar
 
"\t"
Seems like unix style, so you may prefer Chr(9) ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks. Problem solved. Hard to find those vb constants in the help section. Even looking up the constant by name dindn't show much.
 
Next hint - do that after pressing F2 (object browser) ;-)

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top