Problem with vb code please help 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
__________________ Core 2 Duo E6400, DFI Infinity 975X/G, 2x 512mb DDR2 667mhz, Albatron 7900gt, WD 200gb SATA, Samsung DVD-RW, Silverstone ST-50EF 500w PSU. |