'checking if a year is a leap-year 'make a new project 'add a form 'add a texbox and a commandbutton 'insert the code 'press F5 Option Explicit PrivateReturnsub
Command1_Click()dim
strDatumas
String If Text1.Text = "" Thenexit
Sub strDatum = ("29-2-" + Text1.Text) If IsDate(strDatum) Then MsgBox Text1.Text + " is a leap-year." _ Else MsgBox Text1.Text + " isn't a leap-year." End Sub Privatesub
Form_Load() Text1.Text = Year(Now) End Sub