On Mar 17, 2006, at 10:40 AM, Jeffrey Ellis wrote:
Hi--
I have two listboxes and have populated each with data. Now what I
want is
to be able to run through each listbox one row at a time and
compare them
side by side. If one has a row which doesn’t match the other, I
want to
insert a new row in the listbox which doesn’t contain the data,
Let's say we have ListBox1 and ListBox2. Their content differs and
neither one is a 'master'. At the end of the operation, we want
ListBox1 and ListBox2 to contain the same items, but not necessarily
in the same order. Is that the idea, for starters?
So we would set up a loop through ListBox1, comparing each entry(List
(i)) in turn with every entry in ListBox2. If a match is not found,
then that entry in ListBox1 should be flagged for later appendage to
ListBox2. You can do that by inserting that entry to a separate
array, or simply inserting a marker in a CellTag for that row. Then
set up a loop through ListBox2, comparing each entry in turn with
every entry in ListBox1. Flag the entries in ListBox2 that don't
match any entries in ListBox1. Now, when you are done, just add the
flagged entries to the appropriate listbox, either by looping through
the appropriate array or looping through the listboxes and appending
tagged entries, depending on which approach you've taken.
It that sounds like an approach that would work and you have problems
coding any part of it, just post some questions.
HTH,
Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>