I would test if adding a FormattingApplied to true is enough:
Private Sub dataGridView1_CellFormatting(ByVal sender As Object, ByVal e As DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
If Me.DataGridView1.Columns(e.ColumnIndex).Name = "Due Date" Then
If e.Value IsNot Nothing Then
Dim dgvdate As String = e.Value.ToString
' MsgBox(dgvdate)
If dgvdate = "5" Then
e.CellStyle.ForeColor = Color.Red
Else
e.CellStyle.ForeColor = Color.Green
End If
e.FormattingApplied = True
End If
End If
End Sub
Maybe you'll need to also format the value manually.
Hope this helps