طلب مساعدة في البحث باسم يوزرفورم
السلام عليكم إخوتي اخوكم ياسر من تونس اود ان تساعدوني في انجاز قاعدة بيانات لمدرسين حاولت تطبيق بعض الدروس و انجازها لكن واجهتني مشكلة في الاكواد و خاصة عند البحث باسم و ترحيل البيانات من الشيت الى يوزرفورم عند طرق 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 |
رد: طلب مساعدة في البحث باسم يوزرفورم
جاري البحث |
رد: طلب مساعدة في البحث باسم يوزرفورم
|
رد: طلب مساعدة في البحث باسم يوزرفورم
بحمد الله تم التوصل لحل إن أداة ListBox مصممة أنها تستقبل البيانات من الشيت بعدد 10 أعمدة كحد أقصى بالطريقة التي تتبعها وذكرتها أنت ولكن يمكن التحايل على هذه الطريقة بجعل أداة ListBox تستقبل البيانات من الشيت عن طريق وسيط وهو مصفوفة حيث نعبئ المصفوفة بكل البيانات التي نحتاجها من الشيت، وبعدها نعبئ أداة ListBox بالمصفوفة بهذه الطريقة يمكن أن تحتوي أداة ListBox على العديد من الأعمدة حيث يمكن أن يتخطى عددها إلى 50 عمودا تم إرسال الملف بعد التعديل تحياتي |
الساعة الآن 11:30 AM |
Powered by Nile-Tech® Copyright ©2000 - 2024