Hallo Zusammen,
mein Code soll all jene Zielen und Spalten löschen, welche durch einen zuvor durchgeführten Code versteckt wurden (Hidden = True). Das tut er auch. Jedoch dauert dieser Vorgang ca. 3 Minuten und das ist mir deutlich zu lang.
Allerdings finde ich keinen Weg, den Vorgang zu verkürzen... Selbst das ScreenUpdate auszuschalten hat nichts gebracht. Habt ihr eine Idee?
Vielen Dank für eure Hilfe!
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableEvents = False
End With
Dim x As Long
For x = 456 To 21 Step -1
If Rows(x).Hidden = True Then
Rows(x).Delete Shift:=xlUp
End If
Next x
Dim hspalte As Long
For hspalte = 270 To 15 Step -1
If Cells(9, hspalte) = "" Then
Columns(hspalte).Delete Shift:=xlUp
End If
Next hspalte
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.EnableEvents = True
End With
|