Excell spreadsheet macros

  • Thread starter Thread starter chuck m.
  • Start date Start date
C

chuck m.

Does anyone know how to or where to get instruction on how
to install a pop-up reminder window in the spreadsheet
that relates to a specific day or date that is identified
within the macros. i.e. "Wednesday inspection due today"
 
Private Sub Workbook_Open()

Dim MyDate
MyDate = #11/25/2003#

If MyDate = Date Then MsgBox "Wednesday inspection
due today"

End Sub
 
This should do it...

You need to run this code in the workbook_open section

Sub What_day()

If Choose(WeekDay(Now()), "Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday") = "Monday" Then
'run macro for Monday
msgbox "today is Monday"
ElseIf Choose(WeekDay(Now()), "Sunday", "Monday", "Tuesday",
"Wednesday",
"Thursday", "Friday", "Saturday") = "Tuesday" Then
'run macro for Tuesday
msgbox "today is Tuesday"
ElseIf Choose(WeekDay(Now()), "Sunday", "Monday", "Tuesday",
"Wednesday",
"Thursday", "Friday", "Saturday") = "Wednesday" Then
'run macro for Wednesday
msgbox "today is Wednesday"
ElseIf Choose(WeekDay(Now()), "Sunday", "Monday", "Tuesday",
"Wednesday",
"Thursday", "Friday", "Saturday") = "Thursday" Then
'run macro for Thursday
msgbox "today is Thursday"
ElseIf Choose(WeekDay(Now()), "Sunday", "Monday", "Tuesday",
"Wednesday",
"Thursday", "Friday", "Saturday") = "Friday" Then
'run macro for Friday
msgbox "today is Friday"
ElseIf Choose(WeekDay(Now()), "Sunday", "Monday", "Tuesday",
"Wednesday",
"Thursday", "Friday", "Saturday") = "Saturday" Then
'run macro for Saturday
msgbox "today is Saturday"
ElseIf Choose(WeekDay(Now()), "Sunday", "Monday", "Tuesday",
"Wednesday",
"Thursday", "Friday", "Saturday") = "Sunday" Then
'run macro for Sunday
msgbox "today is Sunday"
End If

End Sub
 
how about
Sub itswednesday()
If Format(Now, "DDD") = "WED" Then MsgBox "It's Wednesday"
End Sub
 
Back
Top