Hi, hoping someone could help. I am running a VFP 6.0 prg retrieving data from an excel spreadsheet but it is not releasing from memory. due to many .xls worksheets I have to open my machine's memory is fulling up. Here is a copy of what I'm doing any suggestions could help. thanks again.
txtfile='d:\1234.xls'
set step on
passwrd = "1234"
loexcel=CREATEOBJECT("Excel.application")
loexcel.workbooks.open(txtfile,,,,passwrd)
********
* Error catching - Turn off FoxPro's error trapping
err=.f.
ON ERROR err=.t.
loExcel.Sheets("APR").Select
IF !err
lcquarter=1
ENDIF
ON ERROR && Reset error trapping
Release loexcel && Release Excel
********
loexcel.ActiveWorkbook.Close **here I'm getting an error as if this object does not exsist
loexcel.Application.Quit **here I'm getting an error as if this object does not exsist
loexcel=.NULL.
RELEASE loexcel
** By this point the program ends but it still shows Excel.exe in the task mananger... How can I clear this from memory?