ich habe eine Userform mit einer Listbox,
funktioniert einwandfrei, allerdings bei
12000 Zeilen dauert es sehr lange, die Zeilen einzulesen !
Public Sub Array_fuellen()
Dim lLetzte As Long ' letzte belegte Zeile in Spalte A
Dim lZeile As Long ' For/Next Zeilen-Zähler
Dim lIndex As Long ' der Zeilen-Index im Array
Dim iSpalte As Integer ' der Spalten-Index im Array
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
With Worksheets("Datenbank")
lLetzte = .Cells(Rows.Count, 1).End(xlUp).Row
For lZeile = 3 To lLetzte
'If Not IsEmpty(Cells(lZeile, 8)) Then ' Spalte H nicht leer?
lIndex = lIndex + 1
ReDim Preserve aTmp(1 To 10, 1 To lIndex)
For iSpalte = 1 To 9
aTmp(iSpalte, lIndex) = Cells(lZeile, iSpalte).Text
aTmp(10, lIndex) = lZeile
Next iSpalte
'End If
Next lZeile
End With
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Gibt es was schnelleres ?
mfg sigrid