Days in the Month
Calculate the number of days in a month.
Private Sub cmdGo_Click()
Dim month_number As Integer
Dim year_number As Integer
month_number = Month(txtMonth.Text)
year_number = Year(txtMonth.Text)
MsgBox "Days: " & Format$(Day(DateSerial(year_number, month_number + 1, 0)))
End Sub
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.