sam003:ファイル読み込みのテスト

sam002で作成したファイルを読み込み、内容をMsgBoxに出力するテスト

Private Sub Command1_Click()
    Dim intFreeFile As Integer
    Dim strRec As String
    Dim intCnt As Integer
        
    intFreeFile = FreeFile
    Open "c:\test.txt" For Output As #intFreeFile Len = 32000
    
    intCnt = 1
    strRec = "LineNumber:" & Format(intCnt, "00000")
    Print #intFreeFile, strRec
    
    intCnt = intCnt + 1
    strRec = "LineNumber:" & Format(intCnt, "00000")
    Print #intFreeFile, strRec
    
    Close #intFreeFile

    MsgBox "End"
End Sub

最初の画面

ボタンを押した後