Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim dt As New Date For Each row As DataGridViewRow In DataGridView1.Rows For c As Int32 = 0 To DataGridView1.ColumnCount - 1 If row.Cells(c).Value IsNot DBNull.Value Then dt = Date.Parse(row.Cells(c).Value) If (Date.Today >= (dt.AddMonths(-1))) And (Date.Today <= dt) Then row.Cells(c).Style.BackColor = Color.Beige MessageBox.Show("date,car num, name", "date") End If End If Next Next End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)