+ Reply to Thread
Results 1 to 13 of 13

how loop specific textboxes to sum the values on userform

  1. #1
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    how loop specific textboxes to sum the values on userform

    Hi
    can anybody help me to write simple code too loop through specific textboxes to sum the values?
    I have textboxes from 34:45 shows the values inside them .what I want to sum the values for each textbox and the total shows in textbox46 .so I sreach for way like loop. this is waht I try to do that
    Please Login or Register  to view this content.
    but gives mismatch error in this TControl, any idea to fix it,please?

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: how loop specific textboxes to sum the values on userform

    Please post a sample file: instructions in yellow banner at top of page
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: how loop specific textboxes to sum the values on userform

    Try

    Please Login or Register  to view this content.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: how loop specific textboxes to sum the values on userform

    Try

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: how loop specific textboxes to sum the values on userform

    @torachan
    thanks . it gives object variable or with block variable is not set in this line
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: how loop specific textboxes to sum the values on userform

    @JohnTopley thanks give me mismatch in this TControl as in OP

  7. #7
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: how loop specific textboxes to sum the values on userform

    Maybe ???

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: how loop specific textboxes to sum the values on userform

    @torachan thanks but I'm afraid shows problem about number format if i Have number format in textboxes like this "#,##0.0"
    doesn't gives me right values. is there any way to deal with number format when summing .

  9. #9
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: how loop specific textboxes to sum the values on userform

    upload your workbook to prevent a guessing game developing.

  10. #10
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: how loop specific textboxes to sum the values on userform

    here is the file
    Attached Files Attached Files

  11. #11
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: how loop specific textboxes to sum the values on userform

    Hammer to crack a walnut.


    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: how loop specific textboxes to sum the values on userform

    much appreciated for your solution

  13. #13
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: how loop specific textboxes to sum the values on userform

    thanks for the feedback and rep point.

+ 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. [SOLVED] Autofill specific textboxes in userform from sheet, and back
    By Harry_1101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2021, 02:39 AM
  2. [SOLVED] Problem running Excel loop with Userform textboxes and checkboxes
    By dentler in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2017, 01:59 PM
  3. Copying contents of specific textboxes from one userform to another
    By Shazza-D in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2016, 11:01 AM
  4. [SOLVED] From UserForm TextBoxes to specific cells on worksheet
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2015, 05:41 PM
  5. [SOLVED] Populating userform textboxes with specific record/row in excel worksheet
    By danmack in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-19-2012, 05:25 AM
  6. Loop into TextBoxes in an UserForm
    By pierre08 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-15-2010, 09:38 AM
  7. Need a macro to loop evaluation of many textboxes in a UserForm.
    By excelnut1954 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-24-2006, 10:35 PM

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