السلام عليكم
الاخ العزيز / ju--------------- حفظه الله
الاخ العزيز / abu--------------- حفظه الله
بارك الله فيكما ولكما امثال الدعاء اضعاف مضاعفة
تقبلا شكري وتقديري
وهذا كود مختصر للعملية التي يقوم بها الكود السابق:
Private Sub Combo_Sect_Change()
On Error Resume Next
Dim Lastrow As Integer, R As Integer, H As Integer
Dim DataCell As Range
Set DataCell = Range("AllData")
Combo_Emp.Clear
Box_ID.Text = ""
H = 0
With DataCell
Lastrow = .Cells(.Rows.Count, 1).End(xlUp).Row
R = 1
Do Until R = Lastrow
If Combo_Sect.Text = "All Sections" Then GoTo 1
If .Cells(R, 2).Text = Combo_Sect.Text Then
1 Combo_Emp.AddItem .Cells(R, 1).Value
If .Cells(R, 4).Text = "Excelent" Then
H = H + 1
End If
End If
R = R + 1
Loop
End With
Box_Count.Caption = Combo_Emp.ListCount
Box_Excelent.Caption = H
End Sub