Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

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
0
eugene007
Asked:
eugene007
1 Solution
 
DhaestCommented:
Just us the format-statement

format(now,"dddd")

--> this will return "monday",... depending of today
0
 
JoaTexCommented:
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
0
 
sazhagianambiCommented:
Hi,

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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now