Number of Days in Month

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have the following code:

StartDate = (((Now() - Day(Now())) - Format(Now() - Day(Now()), "d")))
EndDate = (Now() - Day(Now()))
DayCount = 0

Do While StartDate < EndDate

Select Case WeekDay(StartDate)
Case Is = 1, 7
DayCount = DayCount
Case Is = 2, 3, 4, 5, 6
DayCount = DayCount + 1
End Select
StartDate = StartDate + 1
msgbox (DayCount & " " & StartDate)
Loop


Can someone tell me why May 2, 2005 would come back as 0 and how to fix?

Thanks
.



Relevant Pages

  • Re: How do I add items within the last 12 months?
    ... I do have a column with the date I want to reference to. ... StartDate of period of interest ... EndDate of period of interest ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Date iteration
    ... Therefore I would every time add a day to the startdate in a loop until it ... was equeal to the enddate. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Count years in date range
    ... I have two columns in a table; one name StartDate, ... EndDate. ... Each table refers to a user and details, obviously, their start ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: Concatenating text fields with a WHERE condition
    ... You have to pass the StartDate and EndDate into the function, ... Function fConcatChild(strChildTable As String, _ ... Prev by Date: ...
    (comp.databases.ms-access)
  • Questions on appts collection (Calendar)
    ... I get duplicates (subject, startdate, enddate) sometimes. ... Prev by Date: ...
    (comp.groupware.groupwise)