ich möchte eine UF-ListView mit Bedingung einlesen.
Leider funktioniert es nicht.
Danke!
Gruß
Ludmila
https://www.herber.de/bbs/user/109359.xlsm
With ListView1
.View = 3
.Gridlines = True
.FullRowSelect = True
.AllowColumnReorder = False
.ColumnHeaders.Add , , Tabelle1.Cells(1, 2) & " " & Tabelle1.Cells(1, 3), 80
.ColumnHeaders.Add , , Tabelle1.Cells(1, 4), 80
.ColumnHeaders.Add , , Tabelle1.Cells(1, 5), 80
.ColumnHeaders.Add , , Tabelle1.Cells(1, 1), 0
.ListItems.Clear
For y = 1 To Cells(Rows.Count, 1).End(xlUp).Row
If Tabelle1.Cells(y, 5) = "Nürnberg" Then
MsgBox Cells(y, 5)
x = x + 1
.ListItems.Add , , Tabelle1.Cells(y, 2) & " " & Tabelle1.Cells(y, 3)
.ListItems(x).SubItems(1) = Tabelle1.Cells(y, 4)
.ListItems(x).SubItems(2) = Tabelle1.Cells(y, 5)
.ListItems(x).SubItems(3) = Tabelle1.Cells(y, 1)
End If
Next y
.HideSelection = False
End With