Auto calculation of age after entering date of birth - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Auto calculation of age after entering date of birth

terrycterryc Posts: 2Member
As I am a nurse I am designing automated forms for MS word for medical summaries, I already know how to produce a Input/message box and enter data on the form but I want to kow how to:
Produce a input box with forward slashes which recognise the format dd/mm/yy and then calculate the age of the person.

eg Input date of birth: 11/06/57
Age is 46 years & 6 months

I guess that it must be a Count command with MsgBox/InputBox but I am struggling with it

terry capewell (UK)


Comments

  • bhavinchhedabhavinchheda Posts: 7Member
    There's an ready made text box in the vb for the date format
    which includes slashes....
    open a vb form....click on project-components-click on microsoft
    masked edit control....
    then double click the masked edit contorl.....
    a text box will apper on the form..
    then click the text box properties ...choose your settings in the format
    ....


    bye for now
    ([email protected])








    : As I am a nurse I am designing automated forms for MS word for medical summaries, I already know how to produce a Input/message box and enter data on the form but I want to kow how to:
    : Produce a input box with forward slashes which recognise the format dd/mm/yy and then calculate the age of the person.
    :
    : eg Input date of birth: 11/06/57
    : Age is 46 years & 6 months
    :
    : I guess that it must be a Count command with MsgBox/InputBox but I am struggling with it
    :
    : terry capewell (UK)
    :
    :
    :

  • terrycterryc Posts: 2Member
    : There's an ready made text box in the vb for the date format
    : which includes slashes....
    : open a vb form....click on project-components-click on microsoft
    : masked edit control....
    : then double click the masked edit contorl.....
    : a text box will apper on the form..
    : then click the text box properties ...choose your settings in the format
    : ....
    :
    :
    : bye for now
    : ([email protected])
    :
    : Many thanks for the prompt reply but can it be set up in MS Word via the VB editor when you record a macro and then edit the macro??

    terry capewell

    :
    :
    :
    :
    :
    :
    : : As I am a nurse I am designing automated forms for MS word for medical summaries, I already know how to produce a Input/message box and enter data on the form but I want to kow how to:
    : : Produce a input box with forward slashes which recognise the format dd/mm/yy and then calculate the age of the person.
    : :
    : : eg Input date of birth: 11/06/57
    : : Age is 46 years & 6 months
    : :
    : : I guess that it must be a Count command with MsgBox/InputBox but I am struggling with it
    : :
    : : terry capewell (UK)
    : :
    : :
    : :
    :
    :

  • bhavinchhedabhavinchheda Posts: 7Member
    i haven't tried with macro with ms word....but i can
    send u code in vb where u have to text box(maskedit) and
    then u automactically can have the age of the person...

    bye....
    ([email protected])






    : : Many thanks for the prompt reply but can it be set up in MS Word via the VB editor when you record a macro and then edit the macro??
    :
    : terry capewell






Sign In or Register to comment.