hello everybody

i try to read a file with input function but it works only with files that contains regular characters

if i want to read a mid file with this code:

VB Code:
  1. Dim filetext, filename As String
  2. filename = Dlg.filename
  3. Open filename For Input As #1
  4.     filetext = Input(LOF(1), #1)
  5. Close #1

It give error: input past end of file
why?