I am working on code at the moment to read a csv file, remove a speific character in each row and then write the line into a new file. The code runs fine except that when I look at the data in the new file it shows like this:
??????????????????????????????????????????????????
Does anybody know what I am doing wrong ??
Thanks
Code:
Private Sub ChangeFile()
Dim iFile As Integer
Dim oFile As Integer
Dim strTemp As String
Dim NewLine As String
iFile = FreeFile
Open "C:\Read.csv" For Input As #iFile
oFile = FreeFile
Open "C:\Write.csv" For Output As #oFile
Do While Not EOF(iFile)
Line Input #iFile, strTemp
NewLine = Replace(strTemp, Chr(34), "")
Print #oFile, NewLine
Loop
Close #iFile
Close #oFile
End Sub
??????????????????????????????????????????????????
Does anybody know what I am doing wrong ??
Thanks
Code:
Private Sub ChangeFile()
Dim iFile As Integer
Dim oFile As Integer
Dim strTemp As String
Dim NewLine As String
iFile = FreeFile
Open "C:\Read.csv" For Input As #iFile
oFile = FreeFile
Open "C:\Write.csv" For Output As #oFile
Do While Not EOF(iFile)
Line Input #iFile, strTemp
NewLine = Replace(strTemp, Chr(34), "")
Print #oFile, NewLine
Loop
Close #iFile
Close #oFile
End Sub