Private Sub cmdSend_Click()
Dim NowDate As Date
Dim DateEnd As Date
Dim DateDif As Long
Dim Task As Object
Set Task = Outlook.CreateItem(olTaskItem)
NowDate = Now()
DateEnd = DateDue.Value
If DateAdd("d", -1, DateEnd) >= 1 Then
DateEnd = DateAdd("d", -1, DateEnd)
Task.Subject = "You have been assigned task " & ConfirmationID.Value
Task.Body = "Please check the Task database for more information."
Task.DueDate = DateEnd
Task.Importance = (olImportanceHigh)
Task.ReminderSet = True
Help us to help you by being more specific. What kind of problem do you have with that code ? What does not work, which are the errors (if any) when it's run? Also precise the version of Office you use, it can matter.