Hello,
I'm trying to link my App to Excel, via the use of EventHandler(). I'm having a real problem getting the IMPLEMENTS to work correctly. I'm using VFP8 and OfficeXP. At first I thought it was my object definition for Excel or the EventHandler function itself. So I cracked open the object browser, dragged the _Application interface into a clean prg, and it generated all the code, looks something like this:
x=NEWOBJECT("myclass")
DEFINE CLASS myclass AS session OLEPUBLIC
IMPLEMENTS _Application IN "Excel.Application"
PROCEDURE _Application_get_Application() AS VARIANT
ENDPROC
PROCEDURE _Application_get_Creator() AS VARIANT
ENDPROC
ENDDEFINE
This won't run. Can't instanciate the object. Gives an error: "Class cannot be instantiated because Member '_APPLICATION_put_FindFormat' does not exist".
Am I trying to implement the wrong interface? I just want to be able to tell when the user saves and shuts down Excel. I'm sure it'll be used for more than that, but for my test, that's all I want. If anyone can help, that'd be cool. Thanks
jfh