Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking whether a file is open in Excel
Message
 
À
30/03/2006 09:09:18
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01105716
Message ID:
01109188
Vues:
38
>Thanks for the code, Gregory, and sorry for the delay.
>
>However, I'm sorry I could not adapt it to my needs, since, perhaps it was rather complex.
>
>Is there something simple, a simple command, just to check whether a particular excel file is open?
>
>Thanks,
>
>Regards,
>
>Steve

Try the code below..
lcFile = 'c:\docs\test.xls'
IF FOPEN('&lcFile',12) = -1
	MESSAGEBOX('File is opened by Somebody!',0+16,'',1500)
Else
    *MODIFY FILE &lcFile
    *FCLOSE('&lcFile')
Endif
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform