Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 182
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening Excel, Book1 opens, remains open with other workbook open DanieB Excel Discussion (Misc queries) 0 September 3rd 09 08:23 AM
how do i stop 16 workbooks from opening when I open excel 2007? GaryDolman Excel Discussion (Misc queries) 1 January 4th 08 08:07 PM
open workbooks when opening an excel file jprogrammer[_11_] Excel Programming 1 May 30th 06 10:18 PM
XLapp.Workbooks.Open is not opening XL app but path is correct IanAndrewJack Excel Discussion (Misc queries) 0 May 23rd 06 03:09 PM


All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"