Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why doesn't this work? Scope? Non-VFP object inside a VF
Message
 
To
05/03/2001 12:42:38
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00481943
Message ID:
00481952
Views:
11
First of all, if you want just open Excel, then you need two lines:
ExcelObject=createObject("Excel.Application")
ExcelObject.Visible = .t.

Now to your question:

>Excel = createObject("ExObj")
>Excel.Show()
READ EVENTS

>DEFINE Class ExObj as custom

>ExcelObject = null

>Function init
this.ExcelObject=createObject("Excel.Application")
this.ExcelObject.Visible = .F.

>Function show
this.ExcelObject.visible = .T.

>ENDDEFINE

You will need to add destroy procedure with clear events.

Still I would not recommend to use your code. Use plain Excel Automation instead.
Previous
Reply
Map
View

Click here to load this message in the networking platform