السلام عليكم
برجاء المساعده عن استخدام كود البحث في Textbox بالارقام مثلا (800) اما اذا كان (800B) لا يقبل
فبرجاء المساعده في تعديل الكود
()Private Sub TextBox4_Change
X = WorksheetFunction.CountIf(Sheet8.Range("a:a"), Val(Me.TextBox4.Value))
Set ws = Application.WorksheetFunction
With Me
If .TextBox4.Value <> "" And X <> 0 Then
.TextBox5 = Application.WorksheetFunction.VLookup(CLng(Me.TextBox4.Value), Sheet8.Range("a1:d10000"), 3, 0)
.TextBox6 = Application.WorksheetFunction.VLookup(CLng(Me.TextBox4.Value), Sheet8.Range("a1:d10000"), 4, 0)
Else
.TextBox5 = ""
.TextBox6 = ""
End If
End With
End Sub
Test 1.xlsm