Captain Black
Posts: 6328
Joined: 30/9/2005
|
This uses the SpinUp() and SpinDown() events, give it a try. (I promise nothing! )
Private Sub cmdSpinner_SpinDown()
Dim TargetRow As Integer
Dim ThisRow As Integer
ThisRow = ActiveCell.Row
TargetRow = ThisRow - 1
Rows(ThisRow).Select
Selection.Cut
Rows(TargetRow).Select
Selection.Insert Shift:=xlDown
Selection.Cut
Rows(ThisRow).Select
Selection.Insert Shift:=xlDown
End Sub
Private Sub cmdSpinner_SpinUp()
Dim TargetRow As Integer
Dim ThisRow As Integer
ThisRow = ActiveCell.Row
TargetRow = ThisRow + 1
Rows(ThisRow).Select
Selection.Cut
Rows(TargetRow).Select
Selection.Insert Shift:=xlDown
Selection.Cut
Rows(ThisRow).Select
Selection.Insert Shift:=xlDown
End Sub
_____________________________
Invisiotext: [color=#F1F1F1]text[/color]
|