Three types of text file are supported
CSV - comma seperated value - columns of data are seperated by a comma and each row is seperated by a carriage return.
PRN - columns of data are aligned by character position and each row of data ends in a carriage return.
TXT - tab delimited - columns of data are seperated by tabs and each row is separated by a carriage return.
Writing data to a textfile
Public Sub WritingData
Dim iFileNumber As Integer
Dim sTheText As String
Dim sFileName As String
iFileNumber = FreeFile
sTheText = "The text that I want to add to the file"
sFileName = "C:\Temp\Text.txt"
Open sFileName For Output As #iFileNumber
Print #iFileNumber, sTheText
© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext