اذهب الي المحتوي
أوفيسنا

تعديل بيانات في فورم


إذهب إلى أفضل إجابة Solved by Mohamed_Fouad,

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

 

السلام عليكم

في الفورم  عند اضافة عدد السجلات الي عدد     65536 لم يتم الاستجابة للتعديل من قبل الكود

 

 

 

Private Sub CommandButton8_Click()
Sheets("data").Select
On Error Resume Next
Dim i As Integer
For i = 5 To 65536
If Val(Me.TextBox22) = Cells(i, 1) Then
Cells(i, 2) = Me.TextBox1.Text
Cells(i, 4) = Me.TextBox132.Text
Cells(i, 3) = Me.TextBox133.Text
Cells(i, 5) = Me.TextBox11.Text
Cells(i, 6) = Me.ComboBox2.Text
Cells(i, 7) = Me.TextBox3.Text
Cells(i, 9) = Me.TextBox7.Text
End If
Next
End Sub

 

Book1669.xls

تم تعديل بواسطه محمد الورفلي1
رابط هذا التعليق
شارك

6 دقائق مضت, أحمد يوسف said:

لأن هذا هو اخر صف في صفحة الإكسيل

 

حتى لوكان قبل هذا الصف بــ  100 صف نفس النتيجة جرب للفائد لك

تم تعديل بواسطه محمد الورفلي1
رابط هذا التعليق
شارك

  • أفضل إجابة
Private Sub CommandButton8_Click()
Sheets("data").Select
On Error Resume Next
Dim i As Long
For i = 5 To 65536
If Val(Me.TextBox22) = Cells(i, 1) Then
Cells(i, 2) = Me.TextBox1.Text
Cells(i, 4) = Me.TextBox132.Text
Cells(i, 3) = Me.TextBox133.Text
Cells(i, 5) = Me.TextBox11.Text
Cells(i, 6) = Me.ComboBox2.Text
Cells(i, 7) = Me.TextBox3.Text
Cells(i, 9) = Me.TextBox7.Text
End If
Next
End Sub
تم تعديل بواسطه Mohamed_Fouad
رابط هذا التعليق
شارك

17 دقائق مضت, Mohamed_Fouad said:

Private Sub CommandButton8_Click()
Sheets("data").Select
On Error Resume Next
Dim i As Long
For i = 5 To 65536
If Val(Me.TextBox22) = Cells(i, 1) Then
Cells(i, 2) = Me.TextBox1.Text
Cells(i, 4) = Me.TextBox132.Text
Cells(i, 3) = Me.TextBox133.Text
Cells(i, 5) = Me.TextBox11.Text
Cells(i, 6) = Me.ComboBox2.Text
Cells(i, 7) = Me.TextBox3.Text
Cells(i, 9) = Me.TextBox7.Text
End If
Next
End Sub

 

شكرا تمام

 

 

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

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.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information