checles قام بنشر مارس 18 مشاركة قام بنشر مارس 18 (معدل) السلام عليكم برجاء المساعده عن استخدام كود البحث في 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 تم تعديل مارس 18 بواسطه checles رابط هذا التعليق شارك More sharing options...
حسونة حسين قام بنشر مارس 18 مشاركة قام بنشر مارس 18 وعليكم السلام ورحمه الله وبركاته عدل If .TextBox4.Value <> "" And X <> 0 Then الى If .TextBox4.Value <> "" And X <> 0 And IsNumeric(.TextBox30.Value) Then 1 رابط هذا التعليق شارك More sharing options...
checles قام بنشر مارس 19 الكاتب مشاركة قام بنشر مارس 19 السلام عليكم استاذ حسونه شكرا للاهتمام ولكن لا تعمل برده بعد تغير الكود رابط هذا التعليق شارك More sharing options...
حسونة حسين قام بنشر مارس 19 مشاركة قام بنشر مارس 19 وعليكم السلام ورحمه الله وبركاته ما الذي لا يعمل اخي ما تم تعديله هو TextBox4 فقط مفروض تعدل باقي التيكست بنفس الطريقه رابط هذا التعليق شارك More sharing options...
احمد عبدالحليم قام بنشر مارس 19 مشاركة قام بنشر مارس 19 Private Sub TextBox4_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If (KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 46 Then Else KeyAscii = 0 MsgBox "يجب ادخال ارقام فقط", vbCritical End If End Sub جرب الكود التالى ربما هو المطلوب رابط هذا التعليق شارك More sharing options...
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.