what is the point of adding another tab if the previous line does it after each cell?
VBA Code:
Dim fso As Scripting.FileSystemObject
Dim ts As Scripting.TextStream
Dim r As Range
Dim ColumnCount As Integer
Dim i As Integer
Set fso = New Scripting.FileSystemObject
' Open for writing
Set ts = fso.OpenTextFile( _
Environ("UserProfile") & "\Desktop\TestExcelFile.txt", ForWriting, True)
' activate Sheet1
Sheet1.Activate
' determine number of columns to copy
ColumnCount = Range("A1", Range("A1").End(xlToRight)).Cells.Count
' iterate through rows and columns
For Each r In Range("A1", Range("A1").End(xlDown))
For i = 1 To ColumnCount
ts.Write r.Offset(0, i - 1).Value & vbTab
If i < ColumnCount Then ts.Write vbTab
Next i
ts.WriteLine
Next r
ts.Close
Set fso = Nothing