Can someone explain why the program below works when the code is NOT in the 'local fn' but does work without the 'local fn' . Thanks Joe '€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ include "Util_Files.incl" '============================ local fn ScanFolder '========================== dim ScanRec as FileScanRec dim ScanFSpec as FSSpec dim temp$ temp$ = files$(_FSSpecFolder,"","",ScanFSpec) ScanRec.ScanSpec = ScanFSpec ScanRec.ScanIndex = 0 while usr ScanFolder(ScanRec) >= 0 long if ScanRec.FndrFlags and _finvisible print ScanRec.ScanIndex,"Not Visible" xelse print ScanRec.ScanSpec.name end if wend print End Fn '================== fn ScanFolder do handleevents until mouse(_down)