I'm new to excel and I am coming clean so will some one please tell me how to create a macro that will automatically start by the current date or but a change of color in the cell by using custom formating.
This code uses the Open Event form the "ThisWorkbook" code module. [Project Explorer in the VBA Editor Alt+F11 then Ctrl+R if it is not up]
It works by checking each time the Workbook is opened for todays date.
Private Sub Workbook_Open() 'This code go's into the "ThisWorkbook" module.
myTime = Time
'If today is older than the date below run:
If Now() >= #9/20/2006# Then
MsgBox "Time is Up!"
'If the time is between the times below run:
If Time >= "6:00:00 PM" And Time <= "6:35:00 PM" Then
myMsg = MsgBox(prompt:="The current System-Time is:" & _
vbCr & vbCr & " " & _
FormatDateTime(myTime, vbLongTime) & vbCr & vbCr & vbCr & _
" and, ""Today"" is:" & vbCr & vbCr & _
FormatDateTime(Date, vbLongDate) & vbCr & vbCr, Title:=Now())