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

مساعده في تعديل كود


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

ارجوا المساعده في تعديل هذا الكود 

لانه يعمل على ابطاء البرنامج بشكل رهيب 

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


 

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

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

جرب هذه الجزئية من الكود لتعويض كل السابق (بتحفظ شديد)...

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

بن علية

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

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