Can anyone tell how can we calculate the age of a person by taking the present date from the user and reading the date of birth from the excel sheet.
I am using macro in excel to do the job.
Can anyone tell how can we calculate the age of a person by taking the present date from the user and reading the date of birth from the excel sheet.
I am using macro in excel to do the job.
first make a TextBox for full date then you need a parsing code for exporting year of birth then calculate it:
[CODE=vb]Dim YearOfBirth as Integer
Text1.text = Year(Date) - YearOfBirth[/CODE]
Why u need to take user input for present date.
Cant u use systemdate.
and if u are used to macros ,it should be straight forward approach for you.
Actually the time user wants to see that after the particular period. So the user will enter the date and I will calculate the time accordingly. So in this case systemdate will not be of any use.
Comment