LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Weekday Function Returns Wrong Number

Excel 2003

I created the following very simple subroutine as a test.

Sub CheckDay()
MsgBox Weekday(Today)
End Sub

The message box displays the number 7. Unfortunately, today is Monday and
the message box should display the number 2. I've verified that my system
time and date are correct. It seems to me that I've run into this before
and that the fix is easy, but I'm just drawing a complete blank and searches
of the on-line help have been fruitless. Can anyone tell me how to make
this simple subroutine return the correct number for the day of the week?

--Tom


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cosine Function Returns Wrong Answer! Gordon Arnaut Excel Discussion (Misc queries) 16 April 3rd 23 02:24 PM
weekday function in excel 2007 wrong geradok Excel Discussion (Misc queries) 5 October 25th 07 10:14 PM
Row() function returns wrong row and more.. Kim Excel Worksheet Functions 5 July 11th 06 02:11 AM
My Datedif function only returns 0's in the cell what's wrong? Tom Excel Worksheet Functions 1 April 13th 06 07:43 PM
month worksheet function returns wrong value Barry Excel Worksheet Functions 6 January 28th 06 12:37 AM


All times are GMT +1. The time now is 10:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"