Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking whether a file is open in Excel
Message
De
02/04/2006 12:52:27
 
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:
01109158
Message ID:
01109817
Vues:
35
Dear Borissov,

Thanks for all the help. I do not know how I put in that fclose() at that point. I was experimenting with various permutations and combinations, and inadvertently sent in that piece of code to you. Feels stupid, all the same..!

But you were right about placement of the fclose()

I have presently adapted Cetins code, with your fclose() location suggestion, and got the right result. My final code is below:
lnHandle = fopen('c:\devstudio\panorama\PTYG.xls',12)
if m.lnHandle > 0
	MESSAGEBOX("File is NOT open")
else
 	lInUse = .t.
	MESSAGEBOX("File is open")
ENDIF				
fclose(m.lnHandle)
With best regards,

Steve.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform