Hi,
I have this small macro which saves results of two columns in excel to a text file - each 5 seconds. It separates the columns with the space- but for some reason it adds the space BEFORE 1st column. I wonder if it can be changed to remove the first SPACE:
Sub TEST()
Dim c As Range, r As Range
Dim output As String
Calculate
For Each r In Range("A1:B20").Rows
For Each c In r.Cells
output = output & " " & c.Value
Next c
output = output & vbNewLine
Next r
Open "C:\DATA\signals.txt" For Output As #1
Print #1, output
Close
End Sub
Thanks a lot!
Bookmarks