Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Interface IMPLEMENTation
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excel Interface IMPLEMENTation
Miscellaneous
Thread ID:
00849263
Message ID:
00849263
Views:
49
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
	* add user code here
	ENDPROC

	PROCEDURE _Application_get_Creator() AS VARIANT
	* add user code here
	ENDPROC

*lots more procedures here
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
Next
Reply
Map
View

Click here to load this message in the networking platform