FrankM
07-24-2019, 05:24 AM
I currently have code to announce the date, when the workbook is opened, but would like to provide a more accurate greeting.
Here is the current code:
Application.Speech.Speak " Today is " & Date
I found this code which is closer to what I am trying to accomplish, I am having trouble finding the proper syntax.
Here is code I found:
SDateTime = WeekdayName(Weekday(Date)) & ", " & MonthName(Month(Date), False) & " " & Day(Date) & ", " & Year(Date)If Hour(Time()) <= 12 Then
greet = "Good morning... it's "
Else
greet = "Good afternoon... it's "
End If
MsgBox greet & SDateTime
The other thing, I am trying to accomplish is improving the greetings window. Current code shows "Good Morning.....it's Wednesday, July 24, 2019"
I would like to add a period at the end. So my goal is to have both the window & speech with the same greeting.
Here is the current code:
Application.Speech.Speak " Today is " & Date
I found this code which is closer to what I am trying to accomplish, I am having trouble finding the proper syntax.
Here is code I found:
SDateTime = WeekdayName(Weekday(Date)) & ", " & MonthName(Month(Date), False) & " " & Day(Date) & ", " & Year(Date)If Hour(Time()) <= 12 Then
greet = "Good morning... it's "
Else
greet = "Good afternoon... it's "
End If
MsgBox greet & SDateTime
The other thing, I am trying to accomplish is improving the greetings window. Current code shows "Good Morning.....it's Wednesday, July 24, 2019"
I would like to add a period at the end. So my goal is to have both the window & speech with the same greeting.