waynejkruse10
Fully Optimized
- Messages
- 3,782
i want to read from a file called a.txt into a string and i use this code
Private Sub Form_Load()
Dim read As String
Dim filename As String
filename = "C:\a.txt"
read = Space(FileLen(filename))
Open filename For Input As #1
Get #1, 1, read
Close #1
MsgBox (read)
End Sub
but it comes up with an error 54 bad file mode
does anyone know whats wrong with it
thanks
wayne
Private Sub Form_Load()
Dim read As String
Dim filename As String
filename = "C:\a.txt"
read = Space(FileLen(filename))
Open filename For Input As #1
Get #1, 1, read
Close #1
MsgBox (read)
End Sub
but it comes up with an error 54 bad file mode
does anyone know whats wrong with it
thanks
wayne