Dim Quitter as boolean private sub Form_Click Quitter = True End sub private sub Form_Load() quitter = false for a=................................. .......... .......... .......... Doevents If Quitter Then exit For next a If Quitter then unload me end sub