Diana,
What VFP version are you using? IIRC, in VFP7 using FOR EACH could cause such problem.
>My VFP program runs fine against Excel 97. When it runs against Excel 2000 it's having trouble releasing the Excel object. I found info on Microsoft site saying that there is a known bug if you use the "with" syntax, so I rewrote my code without "with" statements. Still giving error on the close.
>
>Does anyone else know of any bugs/workarounds for Excel 2000?
--sb--