Examples of the VBA Open Statement
Sub SimpleOpenExamples()
Dim lInputFile As Long
Dim lOutputFile As Long
Dim lAppendFile As Long
lInputFile = FreeFile
Open "C:\MyInputFile.txt" For Input As #lInputFile
lOutputFile = FreeFile
Open "C:\MyNewOutputFile.txt" For Output As #lOutputFile
lAppendFile = FreeFile
Open "C:\MyAppendFile.txt" For Append As #lAppendFile
Close lInputFile, lOutputFile, lAppendFile
End Sub
Related examples in the same category