Hello friends,
I am facing an issue while creating while creating calenders in Visual basic 6.0. I I need a function which takes a year as input and tells whether it's a leap year or not.
Hello friends,
I am facing an issue while creating while creating calenders in Visual basic 6.0. I I need a function which takes a year as input and tells whether it's a leap year or not.
Try to follow this steps first go to Project - - >components and from here select Microsoft calendar control 12 and finally add calendar in your application.
I would suggest you to use the following code for finding input values is a leap year or not.
Code:Private Sub Form_Load() MsgBox "2008 = " & IsLeapYear(2008) MsgBox "2009 = " & IsLeapYear(2009) End Sub Private Function IsLeapYear(ByVal iYear As Integer) As Boolean Dim strDate As String strDate = "February 29, " & iYear IsLeapYear = IsDate(strDate) End Function
Bookmarks