How can I write per column in .csv file using VB6? I use File System Object .writeline to read and write in .csv file but my problem is it only write in one column only. Can someone please help me.
Dim fso As New FileSystemObject
Dim fsoStream As TextStream
Set fsoStream = fso.CreateTextFile("C:\Users\Users\Desktop\File\Sample.csv", True)
fsoStream.WriteLine "Like This is what I have tried" 'this must be written in the first column
fsoStream.WriteLine "But this is a sample only" 'this must be written in the first column
fsoStream.WriteLine "Sample 1" 'this must be written in the second column
fsoStream.WriteLine "Sample 1" 'this must be written in the second column
fsoStream.WriteLine "Sample 2" 'this must be written in the third column
fsoStream.WriteLine "Sample 2" 'this must be written in the third column
fsoStream.Close
Set fsoStream = Nothing
Set fso = Nothing
This picture must be the output.

but this is what I have got in using the code above

