Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to prevent Excel return to VFP?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00245813
Message ID:
00245845
Vues:
14
Terry,

If Excel is terminating it's because your oExcel object went out of scope and took the Excel app with it. If you are doing this from a .prg you probably need a PUBLIC variable or at least one scoped higher than the prg. Personally I'd use an object property to hold the reference.

It works in the command window because you effectively have created a public memvar oExcel that doesn't go out of scope until you release it or reassign it.

>Hello!
>From the command window:
>OExcel.Visible=.t.
>Will open an excel session. Excel remains open until close is clicked.
>
>However, inside a PRG, the Excel window flashes on and off, and process returns (immediately) to VFP. Is there a timer/API method that could be processed by VFP to prevent Excel from immediately closing when the ole call is issued from inside a PRG?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform