AW: Frage an Tino oder Andere
15.11.2009 23:16:57
Gerd
Hallo Frank,
ich habe in der Lade-Prozedur etwas rumgeprimelt. Teste mal.
Sub LadeDatenListBox(ByRef ArData, Datum As Date)
Dim Ar2, Ar3(), TempAR()
Dim A&, AA&, AAA&
Dim LRowMax As Long
Dim i As Long
Dim j As Long
With Tabelle1
LRowMax = .Cells(.Rows.Count, 53).End(xlUp).Row
If LRowMax
Sub 'keine Daten
Ar2 = .Range(.Cells(3, 53), .Cells(LRowMax, 68))
For i = 3 To LRowMax
For j = 53 To 68
Ar2(i - 2, j - 52) = CStr(.Cells(i, j).Text)
Next
Next
ReDim Preserve Ar3(1 To UBound(Ar2, 2), 1 To UBound(Ar2))
End With
For A = 1 To UBound(Ar2)
If Ar2(A, 1) = Datum Then
AAA = AAA + 1
For AA = 1 To UBound(Ar2, 2)
Ar3(AA, AAA) = Ar2(A, AA) 'Daten aus Spalte 53 bis 69
Next AA
End If
Next A
If AAA > 0 Then
ReDim Preserve Ar3(1 To UBound(Ar3), 1 To AAA)
If AAA = 1 Then
ReDim Preserve TempAR(1 To 1, 1 To UBound(Ar3))
For A = 1 To UBound(Ar3)
TempAR(1, A) = Ar3(A, 1)
Next A
ArData = TempAR
Else
ArData = Application.Transpose(Ar3)
End If
End If
End Sub
Gruß Gerd