weiß jemand eine Möglichkeit wie man mit einem Drehfeld (SpinButton) auf einer UserForm die Zeilen einer Tabelle der Pfeilrichtung folgend anwählen kann?
Gruß Reiner
Private Sub SpinButton1_SpinDown()
If ActiveCell.Row < Rows.Count Then
ActiveCell.Offset(1, 0).Select
End If
End Sub
Private Sub SpinButton1_SpinUp()
If ActiveCell.Row > 1 Then
ActiveCell.Offset(-1, 0).Select
End If
End Sub
Private Sub SpinButton1_SpinDown()
Rows(Selection.Row + 1).Select
End Sub
Private Sub SpinButton1_SpinUp()
Rows(Selection.Row - 1).Select
End Sub
Private Sub SpinButton1_SpinDown()
If ActiveCell.Row < Rows.Count Then
ActiveCell.Offset(1, 0).Select
End If
End Sub
Private Sub SpinButton1_SpinUp()
If ActiveCell.Row > 1 Then
ActiveCell.Offset(-1, 0).Select
End If
End Sub
Private Sub SpinButton1_SpinDown()
If ActiveCell.Row < Rows.Count Then
With ActiveCell.Offset(1, 0)
If Year(.Value) = Jahr Then
.Select
Else
Beep
End If
End With
End If
End Sub
Private Sub SpinButton1_SpinUp()
If ActiveCell.Row > 1 Then
With ActiveCell.Offset(-1, 0)
If Year(.Value) = Jahr Then
.Select
Else
Beep
End If
End With
End If
End Sub
Private Sub SpinButton1_SpinDown()
If ActiveCell.Row < Rows.Count Then
With ActiveCell.Offset(1, 0)
If Year(Cells(.Row, 4)) = jahr Then
.Select
Else
Beep
End If
End With
End If
End Sub
Private Sub SpinButton1_SpinUp()
If ActiveCell.Row > 1 Then
With ActiveCell.Offset(-1, 0)
If Year(Cells(.Row, 4)) = jahr Then
.Select
Else
Beep
End If
End With
End If
End Sub