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.
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.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.