If txtYear.Text = "" Then MsgBox "Please Enter Year", vbOKOnly, "Data Entry Error" txtYear.SetFocus ElseIf IsNumeric(txtYear.Text) = False Then MsgBox "Please Enter a Valid Numeric Year", _ vbOKOnly, "Data Entry Error" txtYear.Text = "" txtYear.SetFocus Else intYear = Val(txtYear.Text) If intYear Mod 400 = 0 Then lblLeapYear.Caption = "Yes" ElseIf intYear Mod 4 = 0 Then If intYear Mod 100 = 1 Then lblLeapYear.Caption = "Yes" End If Else: lblLeapYear.Caption = "No" End If End If