Use two lisboxes

Load 1st with 52 cards.

Create for loop which will remove 12 cards from listbox
1 by 1 and add them to listbox2 (as these card are being added to 2, delee them from one). Then take the first six from listbox2 and add them to the top of listbox1 - (listbox1.additem "card", 0) 0, I belive is the first position. Then the remaining 6 in listbox2, add to the bottom of listbox1 (listbox1.additem "card" , (index - here detremine the count of the item in list1 +1). This would add these cards to the bottom of list1. Then delete the twelve entries in list2.

I wish you luck. I tired from just typing the theory...