目次 |
---|
・文字列検索 ・Line Input |
Inf = FreeFile Open "c:¥tools¥a.txt" For Input As #Infこれでa.txtというファイルを入力モードで操作できるようになります。
Inf = FreeFile Open "c:¥tools¥a.txt" For Input As #Inf Do Until EOF(Inf) LoopEOF関数の引数にはファイル番号を指定し、Do Untilと併用します。EOF関数はファイルの終わりになるとTrueを返し、それ以外はFalseを返す関数です。
Dim Str As String Inf = FreeFile Open "c:¥tools¥a.txt" For Input As #Inf Do Until EOF(Inf) Line Input #Inf, Str MsgBox Str Loop