Thursday, June 3, 2010

Print current day of the week

Dim MyDate, MyReturn
MyDate = "January 11, 1981"
MyReturn = Weekday(MyDate, vbSunday)
MsgBox MyReturn
(Or)
Dim MyDate, MyReturn
MyDate = Date
MsgBox MyDate
MyReturn = Weekday(MyDate, vbUseSystemDayOfWeek)
MsgBox MyReturn

No comments: