I have modified an old program of mine which has always had (successful!) file handling operations. The new file is opened, just like the others, via: Code: FileOpen(fileTime, AppPath & "\filedTime.txt", cWrite, cAppend, cASCII) But now I am using FileReadToEnd() and FilePut() which I have not used before. When I execute either one of these, either within IDE or compiled, I get "Unable to cast" fail messages such as the one attached. What's wrong? Mike.