Open "c:\SmallFile1.txt" For Output As fnum1
fnum2 = FreeFile
Open "c:\SmallFile2.txt" For Output As fnum2Do While Not EOF(fnum)Line Input #fnum, temp
temp1 = ""
For m = 1 To Len(temp)
If Mid(temp, m, 1) = "~" Then
temp1 = temp1 & ","
ElseIf Mid(temp, m, 1) = "'" ThenElse
temp1 = temp1 & Mid(temp, m, 1)End IfNext m
If n = 1 ThenPrint #fnum2, temp1
End IfIf n < 3500000 Then
Print #fnum1, temp1
Else
Print #fnum2, temp1
End Ifn = n + 1Loop
Close fnum
Close fnum1
Close Fnum2End SubThis example works the same way as the previous one in terms of replacing characters in
the file, but there are now two output files (SmallFile1 and SmallFile2). It also has a counter
(n) to keep track of the number of rows.310 Microsoft Access 2010 VBA Macro Programming