ما المقصود بالمتغير Lab.Caption = .Cells(ii, 3).Row فى كود البحث للاستاذ / مجدى يونس حيث اننى عند تطبيقه يعطينى رسالة ( متغير غير معرف )
If Me.TextBox4.Value = "" Then Exit Sub
Set Sh = Sheets("ورقة1")
With Sh
Me.TextBox1.Value = "": Me.TextBox2.Value = "": Me.TextBox3.Value = ""
Last = .Range("A" & Rows.Count).End(xlUp).Row
For ii = 1 To Last
If LCase(CStr(.Cells(ii, 1).Value)) = LCase(CStr(TextBox4.Value)) Then '
TextBox1.Value = .Cells(ii, 1).Value
TextBox2.Value = .Cells(ii, 2).Value
TextBox3.Value = .Cells(ii, 3).Value
Lab.Caption = .Cells(ii, 3).Row
CommandButton3.Enabled = True: CommandButton2.Enabled = True: CommandButton1.Enabled = False
End If
Next ii
End With
If Me.TextBox1.Value = "" Then
MsgBox "This Name Does Not Exist", vbExclamation, "Search"
CommandButton3.Enabled = False: Lab.Caption = "": CommandButton2.Enabled = False: CommandButton1.Enabled = True
End If
End Sub