General information
Category:
COM/DCOM and OLE Automation
>mmm... sounds interesting, how can i refers the Excel application using the GetObject() call?. Because one of the lacks of using createobject("excel.application") is that the objects remains in memory no matters the vfp variable has been released.
Argh, hit Send and then realized I'd used "worksheet" throughout my message and it should have been "workbook". Here's the answer again, but right this time:
Sorry, I should have answered that in my original message. First, I recommend that rather than calling the variable you get back from GetObject oExcel (or oXL or whatever), you call it oWorkbook. Then, you can use the Workbook's Application property to get a reference to Excel:
oWorkbook = GetObject("yourfile.XLS")
oExcel = oWorkbook.Application
Now you have variables to reference both the workbook and the application. Just be sure to set both to .null. once you shut down Excel.
Tamar
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only