da war noch was nicht angepasst. Tausch diese Prozedur aus:
Private Sub ListboxLaden()
Dim arrTab(), i&
With Tabelle7.ListObjects(1)
If .DataBodyRange Is Nothing Then lstAudits.Clear: Exit Sub
arrTab = .DataBodyRange.Value
If .ListRows.Count > 1 Then
arrList = Application.Index(arrTab, Evaluate("row(1:" & UBound(arrTab, 1) & ")"), arrSpZuordnung)
For i = 1 To UBound(arrList)
arrList(i, 1) = i
Next i
Else
ReDim arrList(1 To 1, 1 To .ListColumns.Count + 1)
arrList(1, 1) = 1
For i = 2 To UBound(arrList, 2)
arrList(1, i) = arrTab(1, arrSpZuordnung(i - 1))
Next i
End If
End With
With lstAudits
.ColumnCount = UBound(arrList, 2)
.List = arrList
.ColumnWidths = "0;50;70;200;60;200;100;100;25;50;100;0"
End With
End Sub
|