Forum Discussion
karol polubinski
Jun 20, 2018Brass Contributor
Conditiona Formating vs VBA code
Good Evening all,
I have a problem I need t make an working expiry sheet.
in conditional formatting I am using =Today() but it only works when I press apply.
i input expired dates and they don't mark in red.
as to vba I am using the following Code
Private Sub Workbook_Open()
Dim Edate As Date
Edate = Format("ToDay", "DD/MM/YYYY") '
If Date > Edate + 2 Then
End If
End Sub
Cannot get it to change t red colour.
Can someone kindly help meplease
- Matt MickleBronze Contributor
Try this:
Private Sub Workbook_Open() Dim Edate As Date Edate = Format(Date, "DD/MM/YYYY") ' If Date > Edate + 2 Then End If End Sub