Private Sub lstData_Click()
Dim lZeile As Long
Dim rngRow As Range
Dim id As String
id = Trim(CStr(rngRow.Cells(lZeile, colAtNummer).Value))
clearForm
If lstData.ListIndex >= 0 Then
If seekArb(id, rngRow) Then
txtNummer = id
txtAnrede = rngRow.Cells(lZeile, colAtAnrede).Value
txtNachname = rngRow.Cells(lZeile, colAtNachname).Value
txtVorname = rngRow.Cells(lZeile, colAtVorname).Value
txtStrasse = rngRow.Cells(lZeile, colAtStrasse).Value
txtWohnort = rngRow.Cells(lZeile, colAtWohnort).Value
txtTelefon = rngRow.Cells(lZeile, colAtTelefon).Value
txtGeburtstag = Format(rngRow.Cells(lZeile, colAtGeburtstag), "dd.mm.yyyy")
txtEintritt = Format(rngRow.Cells(lZeile, colAtEintritt), "dd.mm.yyyy")
txtAustritt = Format(rngRow.Cells(lZeile, colAtAustritt), "dd.mm.yyyy")
txtgenBis = Format(rngRow.Cells(lZeile, colAtgenBis), "dd.mm.yyyy")
txtgruppe = rngRow.Cells(lZeile, colAtGruppe).Value
txtkrankenkasse = rngRow.Cells(lZeile, colAtKrankenkasse).Value
txtbemerkung = rngRow.Cells(lZeile, colAtBemerkung).Value
Else
MsgBox "Nummer " & id & " nicht gefunden", vbExclamation + vbOKOnly
End If
End If
End Sub