View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal Robert Crandal is offline
external usenet poster
 
Posts: 309
Default Weekday function

I just found out that VBA does actually provide a function of it's
own. It is called "WeekdayName()"

It works as follows:

WeekdayName(1) == returns "Sunday"
WeekdayName(1) == returns "Sunday"
WeekdayName(1) == returns "Sunday"
WeekdayName(1) == returns "Sunday"
WeekdayName(1) == returns "Sunday"
WeekdayName(1) == returns "Sunday"


"Bob Phillips" wrote in message
...
Don't think so, you would need to write one

Function MyWeekDay(DayNum As Long) As String
Dim Days As Variant

MyWeekDay = Format(Date - (Weekday(Date) - 2) + DayNum - 2, "ddd")
End Function