Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
which weekday?
I have the following code now:
If Day(strStartDatumArray(0)) = 1 Or Day(strStartDatumArray(0)) = 7 Then msgbox("you have choosen a weekend!") End If However I want to be able to tell the user if he/she has chosen a saturday or sunday. I think there is a vba function that returns the name of the day. I know you can do this be yourself but it would be nicer to use function that gives you the name of the day so that you can write: msgbox("you have chosen a " & WeekdayName(strStartDatumArray(0)) & ". Please choose a weekday instead!") As I said I know you write some case select or something that solves this problem also but I would like to know the vba function that does it automatically. Thanks alot in advance! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
which weekday?
You could use something like:
MsgBox("You have chosen a " & WeekDayName(WeekDay(strStartDatumArray(0))) & ". Please choose a weekday instead!") -JK Arne Hegefors wrote: I have the following code now: If Day(strStartDatumArray(0)) = 1 Or Day(strStartDatumArray(0)) = 7 Then msgbox("you have choosen a weekend!") End If However I want to be able to tell the user if he/she has chosen a saturday or sunday. I think there is a vba function that returns the name of the day. I know you can do this be yourself but it would be nicer to use function that gives you the name of the day so that you can write: msgbox("you have chosen a " & WeekdayName(strStartDatumArray(0)) & ". Please choose a weekday instead!") As I said I know you write some case select or something that solves this problem also but I would like to know the vba function that does it automatically. Thanks alot in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
WEEKDAY() function: display TEXT not numeric weekday | Excel Discussion (Misc queries) | |||
WEEKDAY() | New Users to Excel | |||
Weekday | Excel Discussion (Misc queries) | |||
Weekday | Excel Worksheet Functions | |||
WEEKDAY using IF | Excel Discussion (Misc queries) |