Private Sub UserForm_Initialize()
Dim iRow As Integer
iRow = 1
Do Until IsEmpty(Worksheets("Daten").Cells(iRow, 1))
lstValues.AddItem Cells(iRow, 1).Value
iRow = iRow + 1
Loop
lstValues.ListIndex = SpinButton1.Value - 1
End Sub
Private Sub SpinButton1_SpinDown()
Dim sTxt As String
With lstValues
If .ListIndex = .ListCount - 1 Then Exit Sub
sTxt = .List(.ListIndex)
.List(.ListIndex) = .List(.ListIndex + 1)
.List(.ListIndex + 1) = sTxt
.ListIndex = .ListIndex + 1
Rows(.ListIndex + 2).Insert
Rows(.ListIndex).Copy Rows(.ListIndex + 2)
Rows(.ListIndex).Delete
End With
End Sub
Private Sub SpinButton1_SpinUp()
Dim sTxt As String
With lstValues
If .ListIndex = 0 Then Exit Sub
sTxt = .List(.ListIndex)
.List(.ListIndex) = .List(.ListIndex - 1)
.List(.ListIndex - 1) = sTxt
.ListIndex = .ListIndex - 1
Rows(.ListIndex + 1).Insert
Rows(.ListIndex + 3).Copy Rows(.ListIndex + 1)
Rows(.ListIndex + 3).Delete
End With
End Sub