اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

في حالة اختيار تاريخ ويصادف يوم الجمعة يصبح الون احمر


لاتبخل

الردود الموصى بها

تفضل

Private Sub txtDate_BeforeUpdate(Cancel As Integer)
    If Weekday(Me.txtDate) = vbFriday Then
       
        Cancel = (MsgBox("The Date is on a " & _
                         Format(Me.txtDate, "dddd") & vbCrLf & vbCrLf & _
                         "Do you want to keep this date?" _
                         , vbYesNo + vbQuestion) = vbNo)
    
        If Cancel Then Me.txtDate.ForeColor = vbRed
    
    End If
End Sub

 

رابط هذا التعليق
شارك

أو ممكن ان يكون الشرط كما يلي

    If Weekday(Me.txtDate) = 6 Then
      
        Cancel = (MsgBox("The Date is on a " & _
                         Format(Me.txtDate, "dddd") & vbCrLf & vbCrLf & _
                         "Do you want to keep this date?" _
                         , vbYesNo + vbQuestion) = vbNo)
    
        If Cancel Then Me.txtDate.ForeColor = vbRed
    
    End If

 

  • Like 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information