Asked By Desmond
22-Dec-09 08:35 AM

I am having reading and writing to a text file
Input line
(122, '1255130744', '2009-10-10', '00:25:44', '67.195.112.172',
'PartnerUs', 'Mozilla/5.0 (compatible; Yahoo! Slurp/3.0;
http://help.yahoo.com/help/us/ysearch/slurp)', 'R'),
Output line
'PartnerUs', 'Mozilla/5.0 (compatible; Yahoo! Slurp/3.0;
http://help.yahoo.com/help/us/ysearch/slurp)', 'R'),
In debug mode this works. But looking at the result file I have an
extra quote at the beginning of the lin.
------ Code -----
Private Sub Form_Load()
Dim x As String
Dim y As String
Dim ReadMe As String
Dim SplitArray() As String
Dim TextLine As String
Dim NewLine As String
Open "F:\VB Apps\MalawiLog2.txt" For Input As 3
Line Input #3, ReadMe
Open "F:\VB Apps\MalawiLog2a.txt" For Output As 4
Do While Not EOF(3)
Line Input #3, TextLine
SplitArray = Split(TextLine, ",")
NewLine = "(''," & SplitArray(1) & "," & SplitArray(2) & "," &
SplitArray(3) & "," & SplitArray(4) & "," & SplitArray(5) & "," +
SplitArray(6) & "," & SplitArray(7) & "," & vbCrLf
Write #4, NewLine;
Loop
Close #3
Close #4
End Sub
Any sugestions as to why the extea quote?