اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

الترحيل الى اخر خلية فارغة في الصف حسب الاسم


الردود الموصى بها

 

السلام عليكم ورحمة الله

عندي في الفورم زر ترحيل  اريد ان يرحل تيكستبوكس7 حسب الاسم في العمود 1

شرط ان يكون الترحيل في اخر خلية فارغة في الصف كما في الامثلة باللون الاصفر

جزاكم الله خيرا

Nouveau dossier 111.rar

رابط هذا التعليق
شارك

قم بتعديل الكود الى هذا الشكل

Private Sub ComboBox1_Change()
Dim ws As Worksheet, lr As Integer, i As Long, Col%
Set ws = Sheets("feuil1")
lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lr
If ComboBox1.Text = Cells(i, 1) Then
ws.Cells(i, 1).Activate

Me.TextBox1.Value = Cells(i, 2)
Me.TextBox2.Value = Cells(i, 3)
Me.TextBox3.Value = Cells(i, 4)
Me.TextBox4.Value = Cells(i, 5)
Me.TextBox5.Value = Cells(i, 6)
Col = Cells(i, Columns.Count).End(1).Column
Me.TextBox7.Value = Cells(i, Col)
End If
Next
End Sub

 

  • Like 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • اضف...

Important Information