peraphs just post... sorry for that.
based M=3 and A=2023, how to list all days?
note:
M is a numeric month A is the year
LIST DAYS IN A MONTH
-
- 5StarLounger
- Posts: 616
- Joined: 27 Jun 2021, 10:46
Re: LIST DAYS IN A MONTH
Code: Select all
Private Sub daylist(M As Long, A As Long)
Dim D As Long
Dim myday As Date
For D = 1 To day(DateSerial(A, M + 1, 0))
myday = DateSerial(A, M, D)
Debug.Print Format(myday, "ddd d mmm yyyy")
Next
End Sub
-
- Administrator
- Posts: 79444
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: LIST DAYS IN A MONTH
Come on, Sal. You have asked this question (or a variation of it) several times now...
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4497
- Joined: 26 Apr 2010, 17:36