hh88 قام بنشر يناير 14, 2018 قام بنشر يناير 14, 2018 السلام عليكم ورحمة الله وبركاتة اساتذتي الكرام كيف اضيف شرط على الكود الزمن بحيث يكون اذا كان ناتج مربع النص يساوي 1 يكون الوميض احمر واذا كان ناتج مربع النص يساوي 2 يكون الوميض ازرق الكود ادناه لايعمل بشكل صحيح بشرطين داحل مربع نص واحد Private Sub Form_Timer() ' اذا كان ناتج مربع النص هو 1 يكون الوميض احمر ' If Me![txtbox] = "1" Then Me.txtbox.BackColor = (IIf(Me.txtbox.BackColor = vbRed, vbWhite, vbRed)) Else Me.txtbox.ForeColor = RGB(0, 0, 0) Me.txtbox.BackColor = RGB(255, 255, 255) End If 'اذا كان ناتج مربع النص هو 2 يكون الوميض ازرق ' If Me![txtbox] = "2" Then Me.txtbox.BackColor = (IIf(Me.txtbox.BackColor = vbBlue, vbWhite, vbBlue)) Else Me.txtbox.ForeColor = RGB(0, 0, 0) Me.txtbox.BackColor = RGB(255, 255, 255) End If end sub
ابوخليل قام بنشر يناير 14, 2018 قام بنشر يناير 14, 2018 If Me![txtbox] = "1" Then Me.txtbox.BackColor = (IIf(Me.txtbox.BackColor = vbRed, vbWhite, vbRed)) ElseIf Me![txtbox] = "2" Then Me.txtbox.BackColor = (IIf(Me.txtbox.BackColor = vbBlue, vbWhite, vbBlue)) Else Me.txtbox.ForeColor = RGB(0, 0, 0) Me.txtbox.BackColor = RGB(255, 255, 255) End If 1
hh88 قام بنشر يناير 15, 2018 الكاتب قام بنشر يناير 15, 2018 On ٢٧/٠٤/١٤٣٩ at 1:23 PM, ابوخليل said: If Me![txtbox] = "1" Then Me.txtbox.BackColor = (IIf(Me.txtbox.BackColor = vbRed, vbWhite, vbRed)) ElseIf Me![txtbox] = "2" Then Me.txtbox.BackColor = (IIf(Me.txtbox.BackColor = vbBlue, vbWhite, vbBlue)) Else Me.txtbox.ForeColor = RGB(0, 0, 0) Me.txtbox.BackColor = RGB(255, 255, 255) End If الف شكر استاذي الكريم ابا خليل الله يعطيك العافية
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.