TPE

http://bayanbox.ir/view/263405954590585756/2mobile.png

Tavvafi@gmail.com


≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

Sub ReadFromFile()

Dim FileNum As Integer
Dim FileName As String
Dim InputBuffer As String

FileName = "C:\Folder\File.TXT"
FileNum = FreeFile

' A little error checking
If Dir$(FileName) <> "" Then ' the file exists, it's safe to continue
Open FileName For Input As FileNum

While Not EOF(FileNum)
Input #FileNum, InputBuffer
' Do whatever you need to with the contents of InputBuffer
MsgBox InputBuffer
Wend

Close FileNum
Else
' the file isn't there. Don't try to open it.
End If

End Sub