Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to know if Excel Workbook is already opened
Message
De
29/03/2007 08:05:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 5
Divers
Thread ID:
01209471
Message ID:
01209623
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
>Hi All,
>
>Using Excel automation I want to open an Excel Workbook if it is not already open. How to check for this?
>

You can loop through the open workbooks and see if one of them is the one you're interested in:
FOR EACH oWB in oXL.Workbooks
  IF oWB.Name == m.cFileName
     * Found it
  ENDIF
ENDFOR
I don't remember offhand whether the Name property is the right one and whether it includes a path, but you can figure that out from Help.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform