>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")
.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.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao