ich habe eine Tabelle von A2 - AD2. Die Spalten sollen in folgender Reihnenfolge via VBR sortiert werden. Leider sagt er mir immer Laufzeitfehler 91
Range("A2:AD900").Select
Selection.AutoFilter
ActiveWorkbook.Worksheets("Eingabe").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Eingabe").AutoFilter.Sort.SortFields.Add Key:= _
Range("D2:D900"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _
:=xlSortNormal
With ActiveWorkbook.Worksheets("Eingabe").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWorkbook.Worksheets("Eingabe").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Eingabe").AutoFilter.Sort.SortFields.Add Key:= _
Range("B2:B900"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _
:=xlSortNormal
With ActiveWorkbook.Worksheets("Eingabe").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub