Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Anzeige
Inhaltsverzeichnis

Excel extrem langsam durch VBA

Forumthread: Excel extrem langsam durch VBA

Excel extrem langsam durch VBA
23.09.2014 16:16:29
Sparrow
Hallo!
Mein Excel ist leider extrem langsam, vermutlich durch eine komplizierte VBA Programmierung - diese lautet wie folgt:
Tabelle 1:

Private Sub Worksheet_Deactivate()
Application.ScreenUpdating = False
ActiveWorkbook.Worksheets("Ereignisse").ListObjects("Ereignisse").Sort. _
SortFields.Clear
ActiveWorkbook.Worksheets("Ereignisse").ListObjects("Ereignisse").Sort. _
SortFields.Add Key:=Range("Ereignisse[Name]"), SortOn:=xlSortOnValues, _
Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Ereignisse").ListObjects("Ereignisse").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Application.ScreenUpdating = True
End Sub

Tabelle 2:

Private Sub Worksheet_Deactivate()
Application.ScreenUpdating = False
ActiveWorkbook.Worksheets("Basisdaten").ListObjects("Basisdaten").Sort. _
SortFields.Clear
ActiveWorkbook.Worksheets("Basisdaten").ListObjects("Basisdaten").Sort. _
SortFields.Add Key:=Range("Basisdaten[Nachname]"), SortOn:=xlSortOnValues, _
Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Basisdaten").ListObjects("Basisdaten").Sort. _
SortFields.Add Key:=Range("Basisdaten[Vorname]"), SortOn:=xlSortOnValues, _
Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Basisdaten").ListObjects("Basisdaten").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Application.ScreenUpdating = True
End Sub
Hat jemand eine Idee wie ich diesen Code vereinfachen könnte? Oder braucht ihr mehr Infos? Vielen Dank im Voraus!
Sascha

Anzeige

1
Beitrag zum Forumthread
Beitrag zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
doppelt owT.
23.09.2014 16:40:10
Klaus
.
Anzeige

Forumthreads zu verwandten Themen

Anzeige
Anzeige