I have written a program where I have opened a text file as #1 ie.
Open MyFile for Input as #1

..and then tried to reference it in a dll thatI had written earlier:

InRec = bu.GetRec(1,10,EndOfFile)

where the first parameter (ie. 1) is the unit number of the file that I have opened, and the second parameter is the ASCII code used as a record delimiter in this file.

However when I call the dll I get 'bad file name or number' even though if I include the class module that contained the source code in my project it works OK.

I can only conclude that the refence to #1 does not carry through to the dll. Is there a way around this apart from opening the file from within the dll itself?