Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why doesn't this work? Scope? Non-VFP object inside a VF
Message
 
À
05/03/2001 12:42:38
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00481943
Message ID:
00481952
Vues:
10
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform