Last active
August 7, 2021 11:57
-
-
Save eggist77/2412cea45d01373a8e27b2b2daeff348 to your computer and use it in GitHub Desktop.
vba read text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub read_text() | |
Dim buf As String | |
Dim n As Integer 'file number | |
Dim file As String | |
file = "C:\tmp\test.txt" | |
n = FreeFile | |
Open file For Input As #n | |
Do While Not EOF(n) | |
Line Input #n, buf | |
MsgBox buf | |
Loop | |
Close #n | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment