كود تطبيق حساب العمر

TextBox1.value=Date

Function Button1_onclick()
Dim born
born = CDate(TextBox2.value)
If Checkbox1.getValue(1)=True Then
TextBox3.value=DateDiff(“d”,born,Date)
End If
If Checkbox1.getValue(2)=True Then
TextBox4.value=DateDiff(“m”,born,Date)
End If
If Checkbox1.getValue(3)=True Then
TextBox5.value=DateDiff(“yyyy”,born,Date)
End If
End Function

Function Button2_onclick()
  Form1.reset()
  txtDate.value=Date()
End Function