![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Selecting the same sheet in excel several times Topic Summary: Excel error generated while closing the application Created On: 30-Jul-2008 14:52 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hello all,
I try to understand with I have a Excel error message when I close the excel document: EXCEL a généré des erreus et sera fermé par Windows. Vous devez redémarrer le programme. Un journal des erreurs est en cours de rédaction. In english something like: Excel has generated a error and will be closed by Windows. You must restart the application. An error log is being written. I've well located the origin of the problem. I use a function to select a specific sheet in excel: OleAutoObj mSheet = null OleAutoArgs mArg = create clear(mArg) if (!null pWorkbook) { put(mArg, pName) oleGet(pWorkbook, "Worksheets", mArg, mSheet) if (null mSheet) { errorBox ("Unable to activate sheet " pName " for Excel application.") } } else { errorBox ("Null Workbook handle.") } delete mArg return mSheet } If I call sheet 1, then 2, then 3 (with their name): no problem (handels are good). But If I call sheet 1, then 2, then an other time 1: the message appears when I close Excel (even I save the document or not) AND handels are good !! I've created the same function to call a sheet with its number, and the result is the same. I found this way to code this or with "Sheet" instead of "Worksheets" but the problem is the same. Do you know how to eliminate the problem ? do you know where to find this log ? Thanks in advance PS I use DOORS 8.2 and Excel 2000 Edited: 30-Jul-2008 at 14:53 by Antoine Caille |
|
![]() |
|
![]() |
|
Here is my function to get a sheet by its number. One thing is that you have to be careful. Sometimes there are things in a workbook that return as a sheet, but are not.
cPropertySheets = "Sheets" cMethodActivate = "Activate" ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
A version that doesn't use global variables
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Hello
I have finally a little bit time to test your function. I found on the net that your function is : if(res != "") { if(confirm("OLE method failed: \n" res "\n\n Do you wish to continue?", msgError)) { return false } else { progressStop() halt } } return true } But your version of the getSheet doesn't avoid windows error message. |
|
![]() |
|
![]() |
|
What error are you getting?
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
EXCEL a généré des erreus et sera fermé par Windows. Vous devez redémarrer le programme. Un journal des erreurs est en cours de rédaction.
In english something like: Excel has generated a error and will be closed by Windows. You must restart the application. An error log is being written. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.