Wednesday, February 16, 2011

AGE CALCULATOR

Now you can calculate Your Age by just entering your date of birth.You just have to do is to copy the script below to notepad and save it as "Age Calculator.vbs"

NOTE:-You can give any name but save it only as .vbs extension otherwise the script will not work



Dim MOB,YOB,DOB,PD,PY,PM,AGE,AGE1,AGE2
DOB=InputBox("Enter Only Your Date Of Birth Except Month & Year","Enter Your Date Of Birth")
MOB=InputBox("Enter Only Your Month(No.) Of Birth Except Date & Year  E.g For October=10 ","Enter Your Month Of Birth")
YOB=InputBox("Enter Only Your Year Of Birth Except Date & Month","Enter Your Year Of Birth")
PD=Day(Date)
PM=Month(Date)
PY=Year(Date)
AGE=PD-DOB
AGE1=PM-MOB
AGE2=PY-YOB


If AGE <0 Then
AGE=AGE+30
AGE1=AGE1-1

End if
If AGE1 <0 Then
AGE1=AGE1+12
AGE2=AGE2-1

End If


Msgbox "You Are Of " & AGE2 & " Years " & AGE1 & " Months " & AGE & " Days",10,"Your Age"


Now Just Enter Your Date of Birth as asked and Yippy!!!!!!!!! Your Age is Calculated

No comments:

Post a Comment