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.
 
Joined
Dec 13, 2017
Messages
71
Reaction score
19
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top