+ Reply to Thread
Results 1 to 6 of 6

Auto-populate Age in UserForm

  1. #1
    Registered User
    Join Date
    06-11-2012
    Location
    Stratford, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    14

    Auto-populate Age in UserForm

    Hello,

    I have created a user form for registrating Swimming Lessons patrons. I have a created a DTpicker drop down for entering the Date of Birth for each child.
    I have created a text box for the Age, but I would like the Age to be auto-populated within the userform, once the D.O.B is entered. Is this do-able?

    Thank you so much.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Auto-populate Age in UserForm

    Yes it is.
    You shall use exit event of DTpicker and write calculated age on a basis of seleted DOB date into your textbox,
    Best Regards,

    Kaper

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Auto-populate Age in UserForm

    You could use DateDiff.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    06-11-2012
    Location
    Stratford, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Auto-populate Age in UserForm

    Thanks so much for your prompt responses. I am still a bit confused. I have attached a sample of my work book. If you open the userform you will see there are input sections for 3 different children.
    Attached Files Attached Files

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Auto-populate Age in UserForm

    Try this.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-11-2012
    Location
    Stratford, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Auto-populate Age in UserForm

    Perfect!!! Thanks so much! Works like a charm

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto populate text box on userform
    By sara1989 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-28-2015, 08:45 AM
  2. Auto populate events in calendar on userform
    By imzhakmaya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2014, 07:31 AM
  3. Auto Populate Form With Selected Email In VBA Userform
    By Jeffrey34 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-18-2014, 07:56 AM
  4. Userform auto-populate text box
    By lengths in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-06-2013, 03:24 PM
  5. [SOLVED] How to auto-populate userform with appropriate data from spreadhseet
    By dheads in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2012, 04:38 PM
  6. Userform - Auto-populate text box
    By revenge4ash89 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2012, 09:54 AM
  7. Userform - Auto populate text box based on another box value
    By revenge4ash89 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2012, 06:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1