> This is the code in the DoubleClick event of the source listbox:
> 
>   ListBoxTarget.AddRow ListBoxSource.Cell(ListBoxSource.ListIndex,0)
>   ListBoxSource.RemoveRow(ListBoxSource.ListIndex)

You can't rely on .ListIndex not changing while your code runs, as you've
discovered the user may be doing something that causes the list to change.

Instead, try this:

-----------------------

SourceRow = whatever row the user clicked

ListBoxTarget.AddRow ListBoxSource.Cell(SourceRow,0)

If SourceRow<=ListBoxSource.ListCount-1 then
    ListBoxSource.RemoveRow(SourceRow)
End If

-----------------------

- John



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to