> I'm trying to find which file ID is avalaible for using in subsequent > statements like open, read and so on. I thought it was a simple one but > I meet Macsbug more times than a normal being should have to. > I'm trying to do it that way : > in a local fn I have this piece of code How about using ToolBox? The sample code is included for mini-runtime, or code resource. Normally, you can only open two file at same time. If you want to use fb statement, how about to do followings? DIM fineInUse(99) ' Make array for file ID and then when you open the file, check that id is in use. When you close the file, check that id is free.