Private Sub BBas_Click()
With ListBoxArtDes
If .ListIndex = 0 Then Exit Sub
Dim temp(2), a As Byte
a = .ListIndex + 1
For n = 0 To 1
temp(n) = .List(.ListIndex, n)
.List(.ListIndex, n) = .List(.ListIndex + 1, n)
.List(.ListIndex + 1, n) = temp(n)
Next
.ListIndex = a
End With
End Sub
Private Sub BHaut_Click()
With ListBoxArtDes
If .ListIndex = 0 Then Exit Sub
Dim temp(2), a As Byte
a = .ListIndex - 1
For n = 0 To 1
temp(n) = .List(.ListIndex, n)
.List(.ListIndex, n) = .List(.ListIndex - 1, n)
.List(.ListIndex - 1, n) = temp(n)
Next
.ListIndex = a
End With
End Sub
Private Sub UserForm_Initialize()
Dim ListArtDes As Range
With Sheets("articles")
Set ListArtDes = .Range("A1:F" & .Cells(Rows.Count, "A").End(xlUp).Row)
End With
ListBoxArtDes.List = ListArtDes.Value
End Sub