السلام عليكم ايها الاخوة الاكارم
عندي مشكلة في كود التعديل بحيث بعد ان اعمل استعلام واقوم بالتعديل على البيانات يتكرر التعديل 100 مرة ارجو حل المشكلة جزاكم الله خيرا وهذا هو الكود
Private Sub CommandButton1_Click()
Dim i As Integer
For i = 1 To 100
If Val(TextBox12.Value) = Cells(i, 1) Then
Cells(i, 1) = TextBox1.Text
Cells(i, 2) = TextBox2.Text
Cells(i, 3) = TextBox3.Text
Cells(i, 4) = TextBox4.Text
Cells(i, 5) = TextBox5.Text
Cells(i, 6) = TextBox6.Text
Cells(i, 7) = TextBox7.Text
Cells(i,
= TextBox8.Text
Cells(i, 9) = TextBox9.Text
Cells(i, 10) = TextBox10.Text
Cells(i, 11) = TextBox11.Text
End If
Next
MsgBox "تم التعديل"
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.TextBox4.Value = ""
Me.TextBox5.Value = ""
Me.TextBox6.Value = ""
Me.TextBox7.Value = ""
Me.TextBox8.Value = ""
Me.TextBox9.Value = ""
Me.TextBox10.Value = ""
Me.TextBox11.Value = ""
TextBox1.SetFocus
End Sub