Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: John Cruz
  Where is John Cruz?
 NY
 New York - United States
 John Cruz
 To: Dale Dedoroy
  Where is Dale Dedoroy?
 Bacolod City, Negros Occidental
 Philippines
 Dale Dedoroy
 Tags
Subject: RE: Not release excel.exe from memory, HELP ple...
Thread ID: 21795 Message ID: 21800 # Views: 21 # Ratings: 0
Version: Visual FoxPro 6 Category: Microsoft Office Automation
Date: Wednesday, April 02, 2003 12:19:13 AM         
   


Thanks for that tip, it now works only if it does not get caught up in an error. exp. sheet = APR it doesn't clear memory any suggestions?

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("JAN").Select
IF !err
lcquarter=1
else
err=.f.
loExcel.Sheets("APR").Select
IF !err
lcquarter=2
endif
ENDIF

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
on error


COMPLETE THREAD

Not release excel.exe from memory, HELP please. Posted by John Cruz @ 4/1/2003 10:12:13 PM
RE: Not release excel.exe from memory, HELP ple... Posted by Dale Dedoroy @ 4/1/2003 10:49:58 PM
RE: Not release excel.exe from memory, HELP ple... Posted by John Cruz @ 4/2/2003 12:19:13 AM
RE: Not release excel.exe from memory, HELP ple... Posted by Ken Blum @ 4/2/2003 5:11:10 PM