Mmm,
thanks. What i did was to open the file only before it's corresponding loop and to close it directly after the corresponding loop. That worked too.

Your example seens better because it allows me to declare everything at the top of my code.
I'll review and addapt my code.

Edwin