Information générale
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
>Darren,
>I almost never do that. It might be the point. I generally do like this:
>
>with oExcel.ActiveWorkBook.ActiveSheet
>.Something
>
>vs
>oSheet = oExcel.ActiveWorkBook.ActiveSheet
>oSheet.Something
>
>I can't say it's the incorrect way. Just not using like that and not having problems it comes to mind. Excel leaving open in processes suggests there is a hanging reference somewhere.
>Cetin
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement