AW: nur noch ein kleines...
09.01.2012 14:23:59
Laund
Nein leider nicht, in der Combobox ist wirklich im Dropdown-Fenster der erste Eintrag leer.
Das ganze sieht momentan so aus:
Dim sDateiARCO As String, wbARCO As Workbook
Dim L As Long, arrARCO, arrARCO2
Application.ScreenUpdating = False
If Not IsArray(arrARCO) Then
sDateiARCO = "v:\Office\Test.xls"
Set wbARCO = Application.Workbooks.Open(Filename:=sDateiARCO, ReadOnly:=True)
Zeilenanzahl = Worksheets("PRO").Cells(Rows.Count, 5).End(xlUp).Row 'von Spalte 5
With wbARCO.Worksheets("PRO")
arrARCO = .Range(.Cells(2, 3), .Cells(Zeilenanzahl, 3))
End With
If Not IsArray(arrARCO2) Then
With wbARCO.Worksheets("PRO")
arrARCO2 = .Range(.Cells(2, 5), .Cells(Zeilenanzahl, 5))
End With
wbARCO.Close SaveChanges:=False
End If
End If
arrARCO = WorksheetFunction.Index(WorksheetFunction.Transpose(arrARCO), 1, 0)
arrARCO2 = WorksheetFunction.Index(WorksheetFunction.Transpose(arrARCO2), 1, 0)
ReDim arrARCO3(WorksheetFunction.Max(UBound(arrARCO), UBound(arrARCO2)), 1)
For L = LBound(arrARCO) To UBound(arrARCO)
arrARCO3(L, 0) = arrARCO(L)
Next
For L = LBound(arrARCO2) To UBound(arrARCO2)
arrARCO3(L, 1) = arrARCO2(L)
Next
With Eingabefeld.Text_ANr
.ColumnCount = 2
.List = arrARCO3
End With
Application.ScreenUpdating = True