علي عقيل قام بنشر مايو 27, 2017 مشاركة قام بنشر مايو 27, 2017 ارجوا المساعده في تعديل هذا الكود لانه يعمل على ابطاء البرنامج بشكل رهيب Dim i As Integer Dim m As String m = Me.ComboBox1.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y1.Text End If Next m = Me.ComboBox2.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y2.Text End If Next m = Me.ComboBox3.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y3.Text End If Next m = Me.ComboBox4.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y4.Text End If Next m = Me.ComboBox5.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y5.Text End If Next m = Me.ComboBox6.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y6.Text End If Next m = Me.ComboBox7.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y7.Text End If Next m = Me.ComboBox8.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y8.Text End If Next m = Me.ComboBox9.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y9.Text End If Next m = Me.ComboBox10.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y10.Text End If Next m = Me.ComboBox11.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y11.Text End If Next m = Me.ComboBox12.Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = y12.Text End If Next رابط هذا التعليق شارك More sharing options...
بن علية حاجي قام بنشر مايو 27, 2017 مشاركة قام بنشر مايو 27, 2017 السلام عليكم ورحمة الله جرب هذه الجزئية من الكود لتعويض كل السابق (بتحفظ شديد)... Dim i As Integer, j Dim m As String For j = 1 To 12 m = Me.Control("ComboBox" & j).Text For i = 2 To 10000 If m = Cells(i, 2) Then Cells(i, 5) = "y" & j & ".Text" Next Next بن علية رابط هذا التعليق شارك More sharing options...
علي عقيل قام بنشر مايو 27, 2017 الكاتب مشاركة قام بنشر مايو 27, 2017 اشكرك على الاجابه ولكن يقول لي ان كومنترول غير موجود ماذا افعل رابط هذا التعليق شارك More sharing options...
بن علية حاجي قام بنشر مايو 27, 2017 مشاركة قام بنشر مايو 27, 2017 السلام عليكم ورحمة الله أبدل في الكود كلمة Control بكلمة Controls بن علية رابط هذا التعليق شارك More sharing options...
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.