How do I read from a file through using a class module?
Posted on 2003-03-29
Can someone explain how I can read information from a text file when I am in a class module? I can read the information in fine when I use my code in the form, but when I try to use a class to do the same thing it won't work. The error I get is run-time error 54 "bad file mode". I can also write to the file in a class, but I can't read from it.
I have tried the following ways, but they won't work when I am in a class:
intfile = freefile
While Not EOF(1)
Line Input #1, temp
temp = Input(LOF(intFile), intFile)