General discussion
December 5, 2008 at 12:52 PM
couret22

list view drag drop

by couret22 . Updated 17 years, 9 months ago

I used this drag drop operation, but when I return the list item is placed back in the original position. Any code or suggestions is appreciated.

Private Sub cmdMoveDown_Click()
Dim intCurrentIndex As Integer
Dim strCurrentText As String

With lstModifiers
If .ListIndex < (.ListCount - 1) And Not .ListIndex = -1 Then intCurrentIndex = .ListIndex strCurrentText = .List(.ListIndex) .RemoveItem .ListIndex .AddItem strCurrentText, intCurrentIndex + 1 .ListIndex = intCurrentIndex + 1 End If End With End Sub

This discussion is locked

All Comments