Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbooks Open = different result than actually opening Workbook
Excel 2003 (Standard) SP2, Windows XP Pro SP2
My project, essentially, searches a 1500 row by 50 column spreadsheet for keywords and stores values for a half-dozen-or-so cells in an array of User-defined type. The keywords are loaded into a listbox, the user picks 1-or-more, and data about cells related to those keywords is extracted from the array. Here's the thing: Sometimes (*not* repeatably), when I open the workbook and select from the listbox I get results that are slightly incorrect (e.g., a keyword actually occurs 56 times, but is reported to occur 52 times). If open the VBE and run the Workbook Open code, I get the correct result. The only explanation I can generate, and I grasp at a straw here, is that the spreadsheet is so laden with formulas (the root of the project is to speed it up by converting major portions to code) that initial calculation is interfering with my code. But there's a problem with that theory. I can trigger the control again, and still get a bad result. If anyone has any ideas, I'd really like to hear them. Thanks. -- Today is not the worst day of my life. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbooks Open = different result than actually opening Workbook
hi,
do you have a code to show? post the code and other poster will see and help -- Regards, Halim "Evan McC" wrote: Excel 2003 (Standard) SP2, Windows XP Pro SP2 My project, essentially, searches a 1500 row by 50 column spreadsheet for keywords and stores values for a half-dozen-or-so cells in an array of User-defined type. The keywords are loaded into a listbox, the user picks 1-or-more, and data about cells related to those keywords is extracted from the array. Here's the thing: Sometimes (*not* repeatably), when I open the workbook and select from the listbox I get results that are slightly incorrect (e.g., a keyword actually occurs 56 times, but is reported to occur 52 times). If open the VBE and run the Workbook Open code, I get the correct result. The only explanation I can generate, and I grasp at a straw here, is that the spreadsheet is so laden with formulas (the root of the project is to speed it up by converting major portions to code) that initial calculation is interfering with my code. But there's a problem with that theory. I can trigger the control again, and still get a bad result. If anyone has any ideas, I'd really like to hear them. Thanks. -- Today is not the worst day of my life. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbooks Open = different result than actually opening Workbo
Thank you for the response, Halim.
Not posting code was a deliberate decision. For one thing, I don't have a specific error at a specific point and entire Project is too much to post. Fundamentally, opening the workbook and running the Workbook Open event code from inside the VBE should produce the same result (assuming no changes to the workbook, and I'm confident there are none in this case -- if there were changes, they'd result from the Workbook Open event code, and I'd see different output *every* time). I don't see how that can be code-dependent. It's the same code, with the same data, running under slightly different conditions. To me, that indicates the problem's in the slightly different conditions, not in the code. Regardless, thanks again for your response. -E. -- Today is not the worst day of my life. "Halim" wrote: hi, do you have a code to show? post the code and other poster will see and help -- Regards, Halim "Evan McC" wrote: Excel 2003 (Standard) SP2, Windows XP Pro SP2 My project, essentially, searches a 1500 row by 50 column spreadsheet for keywords and stores values for a half-dozen-or-so cells in an array of User-defined type. The keywords are loaded into a listbox, the user picks 1-or-more, and data about cells related to those keywords is extracted from the array. Here's the thing: Sometimes (*not* repeatably), when I open the workbook and select from the listbox I get results that are slightly incorrect (e.g., a keyword actually occurs 56 times, but is reported to occur 52 times). If open the VBE and run the Workbook Open code, I get the correct result. The only explanation I can generate, and I grasp at a straw here, is that the spreadsheet is so laden with formulas (the root of the project is to speed it up by converting major portions to code) that initial calculation is interfering with my code. But there's a problem with that theory. I can trigger the control again, and still get a bad result. If anyone has any ideas, I'd really like to hear them. Thanks. -- Today is not the worst day of my life. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening Excel, Book1 opens, remains open with other workbook open | Excel Discussion (Misc queries) | |||
how do i stop 16 workbooks from opening when I open excel 2007? | Excel Discussion (Misc queries) | |||
open workbooks when opening an excel file | Excel Programming | |||
XLapp.Workbooks.Open is not opening XL app but path is correct | Excel Discussion (Misc queries) |