This tip will tell you how many days are in the specified month and year. This code does take leap year in account.Using this code I found that 2/2008 is a leap year.

Start a project add 1 label 2 text boxes and 1 command button. Then cut and paste the code below. When the program launches the month and year and click the command button.

==========================================================
Option Explicit

'Hold the results of the function
Dim res As Integer

Function DaysInMonth(ByVal Month _
As Integer, ByVal Year As Integer) As Integer

DaysInMonth = DateDiff("d", DateSerial _
(Year, Month, 1), DateSerial(Year, _
Month + 1, 1))
res = DaysInMonth
End Function

Private Sub Command1_Click()
Dim m, y As Integer

m = Text1
y = Text2

DaysInMonth m, y
Label1.Caption = res
End Sub