- Katılım
- 20 Haziran 2011
- Mesajlar
- 29
- Excel Vers. ve Dili
- Microsoft 365 Deutsch
arkadaslar merhaba, asagidaki kodlar ile, listbox1 icinde listelenen isimler var, hangi isme tiklarsam o ismi tabelle1 deki B sütünunda buluyor, ve textbox lara getiriyor ama lsitede ayni isme sahip 4 kisi olabiliyor o yüzden ilk bulunani texbox a getiriyor, buna ilave olarak sunu yapmak istiyorum, aramayi ad soyad olarak yapsin.
umarim sorunumu ifade edebilmisimdir. kisacasi listboxta hangi isme cift tiklarsam onu tabelle1 de isim ve soyisme göre arasin
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
On Error GoTo Bitir
vbDatum.Value = Format(ListBox1.List(ListBox1.ListIndex, 0), "dd.mm.yyyy")
vbNachname.Value = ListBox1.List(ListBox1.ListIndex, 1)
vbVorname.Value = ListBox1.List(ListBox1.ListIndex, 2)
vbPassnummer.Value = ListBox1.List(ListBox1.ListIndex, 3)
vbGbdatum.Value = Format(ListBox1.List(ListBox1.ListIndex, 4), "dd.mm.yyyy")
vbFreigabe.Value = ListBox1.List(ListBox1.ListIndex, 5)
vbZahlungsmethode.Value = ListBox1.List(ListBox1.ListIndex, 6)
vbZahlungsdatum.Value = Format(ListBox1.List(ListBox1.ListIndex, 7), "dd.mm.yyyy")
Tabelle1.Range("B:B").Select
Selection.find(What:=vbNachname.Value, LookAt:=xlWhole).Select
Exit Sub
Bitir: MsgBox "Der gesuchte Datensatz konnte nicht gefunden werden"
End Sub
umarim sorunumu ifade edebilmisimdir. kisacasi listboxta hangi isme cift tiklarsam onu tabelle1 de isim ve soyisme göre arasin
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
On Error GoTo Bitir
vbDatum.Value = Format(ListBox1.List(ListBox1.ListIndex, 0), "dd.mm.yyyy")
vbNachname.Value = ListBox1.List(ListBox1.ListIndex, 1)
vbVorname.Value = ListBox1.List(ListBox1.ListIndex, 2)
vbPassnummer.Value = ListBox1.List(ListBox1.ListIndex, 3)
vbGbdatum.Value = Format(ListBox1.List(ListBox1.ListIndex, 4), "dd.mm.yyyy")
vbFreigabe.Value = ListBox1.List(ListBox1.ListIndex, 5)
vbZahlungsmethode.Value = ListBox1.List(ListBox1.ListIndex, 6)
vbZahlungsdatum.Value = Format(ListBox1.List(ListBox1.ListIndex, 7), "dd.mm.yyyy")
Tabelle1.Range("B:B").Select
Selection.find(What:=vbNachname.Value, LookAt:=xlWhole).Select
Exit Sub
Bitir: MsgBox "Der gesuchte Datensatz konnte nicht gefunden werden"
End Sub