Link to home
Start Free TrialLog in
Avatar of eugene007
eugene007

asked on

Day

I am looking for a code that enable me to retrieve the
day. For example monday, tuesday till sunday. How is it
done?.

Regards
Eugene
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JoaTex
JoaTex

Hi
Put this code in a form:

Code:
Option Explicit
Dim MySentence(6)
Dim MyDayWeek
Dim Msg
Private Sub Form_Activate()
   MySentence(0) = "Today is My First day"
   MySentence(1) = "Today I'm Worried"
   MySentence(2) = "Today I Feel Good"
   MySentence(3) = "Today I'm Much Better"
   MySentence(0) = "Today Im Great"
   MySentence(5) = "Today is my Day"
   MySentence(6) = "Today is to Rest"
   MyDayWeek = Weekday(Date)
   Msg = MsgBox(MySentence(MyDayWeek), 48, "Hello")
   End
End Sub
Hi,

As per Dhaest comment,
Msgbox Format(Date,'dddd')
will work Very Finely