Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim sFileText as String
- Dim iFileNo as Integer
- iFileNo = FreeFile
- 'open the file for reading
- Open "C:\Test.txt" For Input As #iFileNo
- 'change this filename to an existing file! (or run the example below first)
- 'read the file until we reach the end
- Do While Not EOF(iFileNo)
- Input #iFileNo, sFileText
- 'show the text (you will probably want to replace this line as appropriate to your program!)
- MsgBox sFileText
- Loop
- 'close the file (if you dont do this, you wont be able to open it again!)
- Close #iFileNo
Advertisement
Add Comment
Please, Sign In to add comment