Howdy, Stranger!

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

Categories

Auto calculation of age after entering date of birth

terrycterryc Member Posts: 2
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 Member Posts: 7
    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 Member Posts: 2
    : 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 Member Posts: 7
    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.