Excel Message box with days of month & date.

Joined
Dec 13, 2017
Messages
71
Reaction score
19
Currently I have the following code:
MsgBox " If today is the 1st of the month, or close to the first go to Date Change - Other. Today is " & Date, vbInformation, _ "Vocational Services Reminder"
Nice, but very basic. I am trying to have the message read " Today is the XX day of the month, & there are XX days left. On or around the 1st day of the month go to Date Change Other."
Here is the current code:
Code:
Private Sub workbook_open()
MsgBox " If today is the 1st of the month, or close the first go to Date Change - Other.         Today is  " & Date, vbInformation, _
                       "Vocational Services Reminder"
                      
       Ans = MsgBox(Msg, vbYesNo, "Do you want to Go to Date Change - Other?")
          
         Select Case Ans
        
    Case vbYes
Sheets("Month_Source").Select
End Select
     End Sub
I have googled, & have found code for between date, but not as complex. Please point me in the right direction.
 
Problem solved .
Here is the code:
Code:
  Dim sGreet As String
    If Hour(Time) <= 12 Then
        sGreet = "Good morning... it's " & WeekdayName(Weekday(Date)) & ", " & MonthName(Month(Date), False) & " " & Day(Date) & ", " & Year(Date) & " & there are " & CDbl(Application.EoMonth(Date, 0) - Date) & " days left in the month."
        'MsgBox "there are " & CDbl(Application.EoMonth(Date, 0) - Date) & " days left."
    Else
        sGreet = "Good afternoon... it's " & WeekdayName(Weekday(Date)) & ", " & MonthName(Month(Date), False) & " " & Day(Date) & ", " & Year(Date) & " & there are " & CDbl(Application.EoMonth(Date, 0) - Date) & " days left in the month."
    End If
    Application.Speech.Speak sGreet
    'MsgBox sGreet & ".", vbInformation, "Vocational Services"

       'Activates a reminder to change the month for the pop up Calendar.
      MsgBox " If today is the 1st of the month, or close to the first, change the month for the Popup Calendar. Today is  " & Date & " & there are " & CDbl(Application.EoMonth(Date, 0) - Date) & " days left in the month.", vbInformation, _
                       "Vocational Services Reminder"
       Application.Speech.Speak " Do you want to change the month for the Popup Calendar? "
       Ans = MsgBox("Do you want to change the month for the Popup Calendar?", vbYesNo, "Vocational Services Reminder")
          
         Select Case Ans
        
    Case vbYes
Sheets("Month_Source").Select
End Select
     End Sub
 
Back
Top