Suchfunktion wird im Listfeld nicht ...
24.09.2020 19:46:58
Walter
ich habe dieses Makro gefunden, die Suchfunktion klappt wird in der Tabelle angezeigt
aber nicht in der Listbox:
Private Sub CommandButton2_Click()
Dim WkSh As Worksheet
Dim lLetzte As Long
Dim myRange As Range
Dim strAddress As String
Dim bolAbbruch As Boolean
Set WkSh = Worksheets("Typen")
lLetzte = WkSh.Cells(Rows.Count, 2).End(xlUp).Row
If lLetzte strAddress Then
myRange.Activate
FundZeile = ActiveCell.Row
' GoSub Anzeigen
End If
End If
Loop While Not myRange Is Nothing And myRange.Address strAddress
If Not bolAbbruch Then
MsgBox "Keine weiteren Datensätze gefunden.", _
48, " Information für " & Application.UserName
FundZeile = 0
Else
MsgBox "Keinen übereinstimmenden Datensatz gefunden", _
48, " Information für " & Application.UserName
FundZeile = 0
End If
Else
MsgBox "Keinen übereinstimmenden Datensatz gefunden", _
48, " Information für " & Application.UserName
FundZeile = 0
With TextBox1
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
End If
End With
End If
End Sub
Hier das Makro für die Übernahme der Daten in die ListBox:
Private Sub CommandButton23_Click()
TextBox1.Value = ListBox1.List(Me.ListBox1.ListIndex, 0)
TextBox2.Value = ListBox1.List(Me.ListBox1.ListIndex, 1)
End Sub
mfg walter k