أدوات الموضوع
انواع عرض الموضوع
قديم 06-22-2020, 05:59 PM
  #1
ياسر مسلم
مشارك مبتدئ
 
تاريخ التسجيل: Jun 2020
المشاركات: 1
Icon20 طلب مساعدة في البحث باسم يوزرفورم

السلام عليكم إخوتي اخوكم ياسر من تونس اود ان تساعدوني في انجاز قاعدة بيانات لمدرسين حاولت تطبيق بعض الدروس و انجازها لكن واجهتني مشكلة في الاكواد و خاصة عند البحث باسم و ترحيل البيانات من الشيت الى يوزرفورم عند طرق listbox اكتف الترحيل الى حدود العمود 9 مما اظطرني لاعادة الرقم 9
Private Sub ListBox1_Click()
For i = 0 To ListBox1.ListCount
If ListBox1.Selected(i) = True Then
لم استطع ارفاق ملف الاكسال بالمراسلة من يمكنه مساعدتي اكون له شاكرا يترك له بريده الالكتروني لارسل الملف

txtnom.Value = ListBox1.List(i, 0)
txtnumero.Text = ListBox1.List(i, 1)
cboecole.Text = ListBox1.List(i, 2)
txtnaissance.Text = ListBox1.List(i, 3)
txtlieu.Text = ListBox1.List(i, 4)
cbocivile.Text = ListBox1.List(i, 5)
cbonbenfants.Text = ListBox1.List(i, 6)
txtmail.Text = ListBox1.List(i, 7)
txtadresse.Text = ListBox1.List(i, 8)
txtcin.Text = ListBox1.List(i, 9)
txtphone.Text = ListBox1.List(i, 9)
cbostatut.Text = ListBox1.List(i, 9)
txtdateembauche.Text = ListBox1.List(i, 9)
txtdateDelimitation.Text = ListBox1.List(i, 9)
txtdateposteact.Text = ListBox1.List(i, 9)
cboancienneté.Text = ListBox1.List(i, 9)
txtdateinspection2.Text = ListBox1.List(i, 9)
txtnotedateinspection2.Text = ListBox1.List(i, 9)
cbolangue2.Text = ListBox1.List(i, 9)
txtdateinspection1.Text = ListBox1.List(i, 9)
txtnotedateinspection1.Text = ListBox1.List(i, 9)

cbolangue1.Text = ListBox1.List(i, 9)

End If
Next i

Private Sub Textrecherche_Change()
cboecole = ""
cbocivile = ""
cbonbenfants = ""
cbostatut = ""
cboancienneté = ""
cbolangue2 = ""
cbolangue1 = ""
txtnumero = ""
txtnom = ""
txtnaissance = ""
txtlieu = ""
txtmail = ""
txtadresse = ""
txtcin = ""
txtphone = ""
txtdateembauche = ""
txtdateDelimitation = ""
txtdateposteact = ""
txtdateinspection2 = ""
txtnotedateinspection2 = ""
txtdateinspection1 = ""
txtnotedateinspection1 = ""

Sheets("Source").Activate
ListBox1.Clear
ss = Sheets("Source").Cells(Rows.Count, 2).End(xlUp).Row
K = 0
For Each c In Range("b2:b" & ss)
B = InStr(c, Textrecherche)
If B > 0 Then
ListBox1.AddItem
ListBox1.List(K, 0) = Cells(c.Row, 2).Value
ListBox1.List(K, 1) = Cells(c.Row, 1).Value
ListBox1.List(K, 2) = Cells(c.Row, 3).Value
ListBox1.List(K, 3) = Cells(c.Row, 4).Value
ListBox1.List(K, 4) = Cells(c.Row, 5).Value
ListBox1.List(K, 5) = Cells(c.Row, 6).Value
ListBox1.List(K, 6) = Cells(c.Row, 7).Value
ListBox1.List(K, 7) = Cells(c.Row, 8).Value
ListBox1.List(K, 8) = Cells(c.Row, 9).Value
ListBox1.List(K, 9) = Cells(c.Row, 10).Value
ListBox1.List(K, 6) = Cells(c.Row, 7).Value

K = K + 1
End If
Next c
ياسر مسلم غير متواجد حالياً  
رد مع اقتباس
 


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML متاحة

الانتقال السريع


الساعة الآن 01:11 PM