Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub WeekDays()
Dim strMon As String
Dim strYear As String
Dim myDate As Date
Dim intMon As Integer
strMon = "April" 'Assuming you're passing the month and year, somehow...
strYear = "2005"
myDate = CDate(strMon & " 01, " & strYear) 'Date set to first day of month
intMon = DatePart("M", myDate) 'Store the month
Do Until DatePart("M", myDate) <> intMon
Select Case DatePart("w", myDate) '"w" is day of week
Case 2, 3, 4, 5, 6 'Weekdays
Debug.Print myDate, DatePart("w", myDate)
End Select
myDate = DateAdd("D", 1, myDate) 'Add 1 day until month changes
Loop
End Sub