calculate your exact age
calculate your exact age
API Declarations
commandbutton called commandbutton1, commandbutton2
Rate calculate your exact age
(1(1 Vote))
a$ = DateDiff("yyyy", TextBox1.Text, TextBox2.Text) ' calculate year
b$ = DateDiff("d", TextBox1.Text, TextBox2.Text) ' calc days
c$ = DateDiff("m", TextBox1.Text, TextBox2.Text) ' calc months
d$ = (b$ * 24) ' calc hours
e$ = (d$ * 60) ' calc minutes
f$ = (e$ * 60) ' calc seconds
MsgBox a$ & " Years " & vbCrLf & b$ & " Days " & vbCrLf & c$ & " Months " & vbCrLf & d$ & " Hours " & vbCrLf & e$ & " Minutes " & vbCrLf & f$ & " Seconds", , "Exact Age"
End Sub
calculate your exact age Comments
No comments yet — be the first to post one!
Post a Comment