قم بالتعديل على اذهب الى مودال وعدل في نطاق البيانات
Option Explicit
'======================================================
'======================================================
' ÇÓã äØÇÞ ÑÄæÓ ÇáÇÚãÏÉ
' Çæ ÚäæÇä ÇáäØÇÞ ãáÍæÞ ÈÇÓã ÇáæÑÞÉ
Private Const MyTopColmnRng As String = "ÇáÈíÇäÇÊ!$B$3:$t$3" قم بالتعديل هنا نطاق البيانت
'======================================================
Sub KH_FIND()
Dim ContRow As Long
Dim vRng As Range
'==========================
On Error GoTo 1
Set vRng = Range(MyTopColmnRng)
'==========================
With vRng
ContRow = .Worksheet.Cells(Rows.Count, .Column).End(xlUp).Row - .Row
End With
'==========================
If ContRow = 0 Then
MsgBox "áÇ ÊæÌÏ ÈíÇäÇÊ ÇÚÊãÇÏÇ Úáì ÂÎÑ ÕÝ Ýí ÇáÚãæÏ ÇáÇæá"
Else
With UserFormSearch
.kh_RngSet vRng, vRng.Offset(1, 0).Resize(ContRow)
.Show
End With
End If
1:
Set vRng = Nothing
End Sub