0

Guys, can you give me some idea on how to validate the day if the selected year is a leap year in combo box.

Thank you in advance.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by codeorder
0

See if this helps.
1 ComboBox

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If Not Date.IsLeapYear(CInt(ComboBox1.SelectedItem)) Then MsgBox("Not a Leap Year.") Else MsgBox("Leap year.")
    End Sub

This link might be of use.

Edited by codeorder: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.