استبدل كود البحث بهذا
Private Sub ButtonFind_Click()
Dim MyValue
Dim MyAr() As String
Dim ib As Boolean
Dim MyRow As Long, RR As Long
Dim C As Integer
'-------------------------
If MyColmnFind = 0 Then Exit Sub
'-------------------------
If Me.ListFind.ListCount Then Me.ListFind.Clear
'-------------------------
sRow = ""
Me.LblSum = 0
'-------------------------
With dRng
For MyRow = 1 To .Rows.Count
ib = dTest(.Cells(MyRow, MyColmnFind))
'=======================
If ib Then
sRow = sRow & MyRow & " "
RR = RR + 1
ReDim Preserve MyAr(1 To ContColmn, 1 To RR)
For C = 1 To ContColmn
If IsDate(.Cells(MyRow, C)) Then MyValue = Format(.Cells(MyRow, C).Value2, DateFormt) _
Else MyValue = Format(.Cells(MyRow, C).Value2, "#,##0.00")
MyAr(C, RR) = MyValue
If C = ContColmn Then Me.LblSum = Val(Me.LblSum) + Val(.Cells(MyRow, C))
Next
End If
Next
End With
'=========================
Me.LblSum = Format(Me.LblSum, "#,##0.00")
Me.LabelCont.Caption = RR
Me.FrameValue.Visible = CBool(RR)
If RR Then
Me.ListFind.Column = MyAr
Me.ListFind.ListIndex = 0
Else
MsgBox "No Data Result...Sorry Oryx", vbMsgBoxRight, "Sorry..Oryx"
End If
Erase MyAr
End Sub