title: VBA Listbox Drag & Drop
body: <p>I'm trying to produce a Drag &amp; Drop functionality in VBA to allow users to move items between ListBoxes on a UserForm. </p>
  
  <p><a href="https://i.stack.imgur.com/tTJbq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tTJbq.png" alt="enter image description here"></a></p>
  
  <p>The issue I'm having is that when you click the mouse button down and move the mouse, the ListBox selection moves up and down the list. I've managed to write some lines which capture the selection as you press the mouse button down, so when you drag it over to the other ListBox the correct item is dropped, however I feel the moving highlighted selection of the first ListBox may be off putting for the end user.</p>
  
  <p>I have tried setting the selection to the original item each time you move the mouse on the MouseMove event however it simply doesn't work when the cursor is in line with items on the list, it does though bounce back when you move the cursor underneath the list.</p>
  
  <p><a href="https://drive.google.com/open?id=0B_qti3g3ezGWOFEzUGduQVRGSzA" rel="nofollow noreferrer">Here's a copy of the macro workbook (Excel 2010)</a></p>
  
  <p>Could anyone shine some light on how this could be improved?</p>
  
  <p>Edit note: this example will only add items from the left box to the right, I plan to replicate any solutions found here on a UserForm with multiple ListBoxes so my hope is that someone knows of a good mechanic to achieve this.</p>