+ Reply to Thread
Results 1 to 6 of 6

userform calculations in textbox

  1. #1
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    204

    userform calculations in textbox

    Hi,

    I've created a userform with 10 text box's that the user enters data into then this adds the data to a worksheet. is it possible to get a textbox to calculate a sum(from textbox 9) and show this in textbox10 and allow this to be added to the worksheet ? instead of the user having to manually calculate it and then type the result into textbox10

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    It is possible

    One way is to use an After update macro

    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    This assumes that you rename the last TextBox to something like txtTotal, you also need to convert the textbox entry to a numeric variant using CDbl or CLng.

    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

  4. #4
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    204
    this is the form spreadsheet i've got what i want to do is for textbox10 to show the result of textbox9 + the calculation to the right of textbox9
    Attached Files Attached Files

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    TextBox9 appears to require a Date, I haven't a clue what calculation you are referring to.

  6. #6
    Forum Contributor
    Join Date
    01-28-2007
    MS-Off Ver
    2019
    Posts
    204
    sorry it the calculation that i written as a label to the right of textbox10

+ 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