Getting your exact age just in a simple code
Getting your exact age just in a simple code
API Declarations
' Create/Draw a textbox in your form for your age
Rate Getting your exact age just in a simple code
(1(1 Vote))
'Bauan East, Solana, Cagayan Philippines 3503
'[email protected]
Private Sub txtbday_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If IsDate(txtbday.Text) Then
txtage.Text = Int(DateDiff("d", txtbday.Text, Date) / 365.25)
Else
MsgBox "Enter the correct date format, mm/dd/yyyy"
txtbday.Text = ""
End If
End If
End Sub
Getting your exact age just in a simple code Comments
No comments yet — be the first to post one!
Post a Comment