'存檔
Private Sub Command1_Click()
    Dim Str As String

    Str = "輸入想存的字吧"
    Open "C:\temp.txt" For Output As #1
    Print #1, Str
    Close #1
End Sub

'讀檔
Private Sub Command2_Click()
    Dim Str As String
    Open "C:\temp.txt" For Input As #1
    Do Until EOF(1)
        Line Input #1, Str
        Debug.Print Str
    Loop
    Close #1
End Sub

goodlucky 發表在 痞客邦 PIXNET 留言(0) 人氣()