+ Reply to Thread
Results 1 to 4 of 4

Making a textbox work out a formula

  1. #1
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Making a textbox work out a formula

    Hi,

    I would like textbox two to calculate the value of textbox one (date of birth i.e. 19/03/1976), using this forumla:

    Please Login or Register  to view this content.
    Can you explain how I can do this using code please?

    Thank you in advance

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Making a textbox work out a formula

    You will have to test this, TextBox2 must contian a proper data
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Re: Making a textbox work out a formula

    Thank s for the quick reply.

    I added it to the textbox1 change event when I entered "/" for example 21/ it came up with an error. Where should the code reside?

    The error states run time error 13 type mismatch.

    I placed it here:

    Please Login or Register  to view this content.
    Thank you in advance.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Making a textbox work out a formula

    Run it in the Exit event, not the Change event.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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