OMG!
Yes - that was a really bad screen scrape - of the wrong procedure. So, to be certain:
1) The function s that should have been there are, indeed, FindFirstSegmentValue, and FindNextSegmentValue
2) I've attached a (clean) set of code to this message.
I've been working on this today, and I have been able to satisfy myself that the 'problem' is, indeed, inside the procedure that calls both of these functions, another function called LoadListControlEntries. This procedure allows me to scan a class using either a serial approach, or what I call a SegmentedSearch approach, which uses the Excel Find/FindNext functions. I did discover one possible problem (which didn't resolve the issue), in that I use a private variable called IRNG to do lots of Excel storage management. This is used both by LoadListControlEntries, and also by the helper function LoadEntryIntoObject. I've changed this so that the SegmentedSearch now use a completely different Private variable called SRNG (Segmented Range) to handle the hidden Excal capabilities which allow it to pick up on a range with hidden values (somewhat like the Sort function).
The version of LoadListControlEntries that is attached is the most recent version, with this separate variable. The uploaded .xlsb file does not necessarily contain the changes.
A more recent statement of my thinking about this is that somewhere in the gap between FindFirstSegmentValue, which sets up the parameters (including the actual SearchValue for the Find) and the call to FindNext, something is happening 'under the covers' to destroy the private-to-Excel values. Of course, because they are private-to-Excel, I can't get at them with debug, or Trace, or anything. I also can't think of any way in which I can test this hypothesis!
Thanks, 6 StringJazzer for pointing out my error. I'd love to hear you play sometime
Tony
1. FindFirstSegmentValue
2. FindNextSegmentValue
3. LoadListoControlEntries
If you are going to patch these versions of the code into the workbook I uploaded yesterday, you may well have to add a line of code to the top of clTrack:
This will allow the use of SRNG in the SegmentedSearch procedures.
Tony
Bookmarks