I created a small sample application showing how to work move elements from one ListBox to another.
The sample code can be found here on Github: https://github.com/PeterHorsbollMoller/mbListInDialogExample
In the dialog you can select a continent from the PopupMenu which will polulate the first Listbox with the countries of the selected continent.
Double click on the countries to move them from one Listbox to another.
See Attachment
The values in the ListBoxes are stored in arrays and the sample code is using the ARRAYLib from the Common MapBasic Libraries to add, remove and find elements in the arrays.
By wrapping functionality into procedures/functions you are able to make your code a lot more readable. So everytime you are writing a pieve of code that you are using more than once, consider putting it into its own function/procedure.