Re: Absolute beginner's question
This Is With Up And Down Buttons With Slight Mods To The Code.
Private Sub cmdMove_Click(Index As Integer)
Dim strTemp As String
Dim intPos As Integer
Dim MySelectionChecked As Boolean
'
If MCListing(1).ListCount > 0 Then
strTemp = MCListing(1).List(MCListing(1).ListIndex)
intPos = MCListing(1).ListIndex
MySelectionChecked = False
If MCListing(1).Selected(intPos) = True Then
MySelectionChecked = True
End If
If Index = 0 Then
If intPos - 1 >= 0 Then
MCListing(1).RemoveItem MCListing(1).ListIndex
MCListing(1).AddItem strTemp, intPos - 1
MCListing(1).Selected(intPos - 1) = MySelectionChecked
End If
Else
If intPos + 1 < MCListing(1).ListCount Then
MCListing(1).RemoveItem MCListing(1).ListIndex
MCListing(1).AddItem strTemp, intPos + 1
MCListing(1).Selected(intPos + 1) = MySelectionChecked
End If
End If
End If
End Sub