Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing Excel
Message
De
12/05/2005 06:03:15
 
 
À
12/05/2005 05:47:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Versions des environnements
OS:
Windows XP
Divers
Thread ID:
01012715
Message ID:
01013294
Vues:
15
>>Hi Cetin
>>
>>I changed my code, to something like you have above, but the process is still hanging in Windows, here is a portion of the code
>>
>>** Open Excel Object
>>oEx=CREATEOBJECT("Excel.Application")
>>lcSH=ALLTRIM(ThisForm.txtSpreadsheetFile.Value)
>>oEx.workbooks.open("&lcSH")
>>
>>** Confirm Legitimate Master Spreadsheet
>>nA1=oEx.ActiveWorkBook.ActiveSheet.Range("A1").value
>>IF nA1=1.1
>>else
>> lcM="Not a Valid Master Spreadsheet"
>> lcH="Error"
>> MESSAGEBOX(lcM,16,lcH)
>> oEx.quit
>> RELEASE oEX
>>ENDIF
>>
>>I am ensuring A1<>1.1 and receiving the Not Valid message, but the process still hangs. Can you see anything I have wrong in this code?
>>
>>Regards
>>Darren
>
>Darren,
>I don't see something wrong (except I don't like .open("&lcSH") - why not .open(m.lcSH)).
>I tried it and it releases (tried under XP,VFP7,Excel2002 - but as I remember Excel2000 would release too).
>Cetin


Thanks Cetin

I have noticed that this is not happening on a machine with nearly identical specs as the machine I am using, so maybe it's my machine and the way it is configured. I will do some more investigating, and see if it happens on a couple of other boxes I have with similar specs.

You are correct, open.(m.lcSH) is a lot cleaner.

Thanks Again
Darren
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform