Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I display calendar days in a row
How do I display calendar days in a row for a complete month instead of colums?
Need help with a customize function. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I display calendar days in a row
Hi, Dates are in UK (DD/MM/YYYY) format - Sub TestDate() Call DaysinMonth(9, 2005) End Sub Sub DaysinMonth(ByVal M As Integer, ByVal Y As Integer) Dim c As Integer, lastDay As Integer lastDay = Day(DateSerial(Y, M + 1, 0)) ' Calculate number of days in Month Rows(1).ClearContents ' Clear row 1 of dates Cells(1, 1) = DateValue("1" & Str(M) & Str(Y)) ' Set first day of month in A1 For c = 2 To lastDay ' Increment each day until end of month .. B1, C1 etc Cells(1, c) = Cells(1, c - 1) + 1 Next c End Sub HTH "Vern H." wrote: How do I display calendar days in a row for a complete month instead of colums? Need help with a customize function. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
aging calendar days | Excel Worksheet Functions | |||
Counting calendar days | Excel Worksheet Functions | |||
Calendar days | Excel Worksheet Functions | |||
Calendar day not days | New Users to Excel | |||
Calculating # of busn days, not just calendar days, between 2 dates? | Excel Programming |