Okay, Let's ask this another way
Hee's a couple of routines
Dim vTemp, vtemp1
With ListBox1
If .ListIndex 0 Then
vTemp = .Value
vtemp1 = .List(.ListIndex, 2)
.List(.ListIndex) = .List(.ListIndex - 1)
.List(.ListIndex, 2) = .List(.ListIndex - 1, 2)
.List(.ListIndex - 1) = vTemp
.List(.ListIndex - 1, 2) = vtemp1
.ListIndex = .ListIndex - 1
End If
End With
End Sub
Dim vTemp, vtemp1
With ListBox1
If .ListIndex < .ListCount - 1 Then
vTemp = .Value
vtemp1 = .List(.ListIndex, 2)
.List(.ListIndex) = .List(.ListIndex + 1)
.List(.ListIndex + 1) = vTemp
.List(.ListIndex + 1, 2) = vtemp1
.ListIndex = .ListIndex + 1
End If
End With
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"asmenut" wrote in message
...
Is there a way to use a multi-column list box to reorder rows of data
(i.e.
move up / move down)?
|