+ Reply to Thread
Results 1 to 6 of 6

Add UserForm textbox values

  1. #1
    Registered User
    Join Date
    09-15-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2016
    Posts
    33

    Add UserForm textbox values

    Hi

    Im trying to add values which have been entered into a user form to get a grand total:

    Please Login or Register  to view this content.
    I've tried it without converting to Double as shown above too and still no luck.

    e.g. adding 567.78 and 12.32 gives me 567.7812.32 in the grand total text box.

    Any help appreciated!!!
    Last edited by Leith Ross; 10-06-2012 at 10:20 PM. Reason: Added Code Tags

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Add UserForm textbox values

    This will work. You will need to make sure that all textbox are numeric values

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Add UserForm textbox values

    Hi mkachwee

    I've code to do just this. If you'll post a sample of your workbook with the UserForm I'll help adapt the code.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Add UserForm textbox values

    Hi,

    This should do it.

    Please Login or Register  to view this content.
    Just in case you are wondering why I put the "on error resume next" line in, it is because if you leave any of the textboxes empty, then it will give you an error. On the other hand, if you don't want any empty then you can use an error handler to display a message to the user that they are some empty fields.

    Good luck.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  5. #5
    Registered User
    Join Date
    09-15-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2016
    Posts
    33

    Re: Add UserForm textbox values

    Hi abousetta

    Thanks the code works perfectly, thanks to all who gave their input

    Highly appreciated!!!

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Add UserForm textbox values

    Thanks for the feedback. Glad I could be of assistance.

    Good luck.

    abousetta

+ 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