Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why won't form release
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00400449
Message ID:
00402230
Views:
16
>Ram, I found the problem was the workbook was still open. I had to do oWkbk.Close(), and the release the oExcel objects. Just doing oExcel.Quit(), does not close the workbook. Always learning!! As george said, there was a dangling object.
>
>thanks everyone for the help, Chuck

It's great that you got it working.

One way I use to avoid situations like this is to set as few variables as possible and just use the Parent->Child hierarchy to access objects and their collections.

Ex.
oexcel = createobject("Excel.Application")
With oexcel
   .Workbooks.Open("MySpreadsheet.XLS")
   * do some processing
   .Workbooks(1).Close(.T.,'mysavefile.xls')
Endwith
oexcel.Quit
oexcel = .NULL.
If I need multiple accesses to objects down the hierarchy, I use another With...Endwith. It avoids having to remember to set every variable I previously set to .NULL. at the end.

Just my $0.02.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform