curteck you can get the value from textbox and AFTER you set the text to "". that way you don't have empty items on listbox.
List box items are separate text element that are accessed using an index. So setting a "" text to a listbox, it clears only the item (or row) at a specific index. In my example it just adds one more item at the end or replace the selected item value.
So to answer your question: Is no trick, just think that the order of your code makes the difference.(copy value then clear ... instead of clear than copy)
capx