From: CG Rosen on
Good evening,

The code below, found in this group, works fine when
the multiselect listbox has 1 column, Struggling to
get it work when the listbox has 2 columns but without
success. Grateful for some hints.

Brgds

CG Rosen
------------------------------------------------------------
Private Sub SpinButton1_SpinUp()

If ListBox1.ListIndex <> -1 Then
i = ListBox1.ListIndex
If i = 0 Then Exit Sub
s = ListBox1.List(i)
ListBox1.RemoveItem i
ListBox1.AddItem s, i - 1
ListBox1.ListIndex = i - 1
ListBox1.Selected(i - 1) = True
SpinButton1.Value = 0
End If

End Sub

From: JLGWhiz on
There is some good basic information at this site:

http://support.microsoft.com/kb/829070





"CG Rosen" <carlgran.rosen(a)telia.com> wrote in message
news:972B75F5-0D0D-4640-A759-DB28B0298C37(a)microsoft.com...
> Good evening,
>
> The code below, found in this group, works fine when
> the multiselect listbox has 1 column, Struggling to
> get it work when the listbox has 2 columns but without
> success. Grateful for some hints.
>
> Brgds
>
> CG Rosen
> ------------------------------------------------------------
> Private Sub SpinButton1_SpinUp()
>
> If ListBox1.ListIndex <> -1 Then
> i = ListBox1.ListIndex
> If i = 0 Then Exit Sub
> s = ListBox1.List(i)
> ListBox1.RemoveItem i
> ListBox1.AddItem s, i - 1
> ListBox1.ListIndex = i - 1
> ListBox1.Selected(i - 1) = True
> SpinButton1.Value = 0
> End If
>
> End Sub
>