+ Reply to Thread
Results 1 to 14 of 14

Label caption

  1. #1
    Forum Contributor
    Join Date
    02-26-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    367

    Label caption

    Hello, could you me help on this.

    I have a userform and 4 textboxes on it and i just want to display the sum/result in Label2 and not in a textbox(I want it in a label). Is it possible?

    Ex:
    textbox1: 5
    textbox2: 5
    textbox3: 5
    textbox4: 5
    Label2: 20
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Label caption

    instead to capture it in textbox maybe something like this
    Please Login or Register  to view this content.
    Regards, John55
    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.

    ...enjoy -funny parrots-

  3. #3
    Forum Contributor
    Join Date
    02-26-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    367

    Re: Label caption

    Hi john, thanks for reply, but i can't get what you've provided

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Label caption

    assuming your result is somewhere in col A you can use...
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-26-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    367

    Re: Label caption

    all the result was in the userform

    label2.caption = textbox1.value+textbox2.value...? i tried that but it's not working.

  6. #6
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Label caption

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

  7. #7
    Forum Contributor
    Join Date
    02-26-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    367

    Re: Label caption

    Hi john, still not I've attached the sample.
    sum of the 4 textboxes should be display in label2.
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Label caption

    yr file is empty, anyway try this in yr file
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    02-26-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    367

    Re: Label caption

    Hi John, still not displaying result in Label2

  10. #10
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Label caption

    Please Login or Register  to view this content.
    not much benefit in doing it in the initialize event if the textboxes are empty ;-)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  11. #11
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Label caption

    hi JosephP,
    Thank you very much for your obs.! I tested on a file with values without takeing into account the empty textboxes!
    ok, I'm "on error", so I'm going to bed! LoL

  12. #12
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Label caption

    :-)
    that line is a reminder to me because I tend to code into the early morning which is not always very productive!

  13. #13
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Label caption

    JosephP, hope you did not mind...it was just a joke!

  14. #14
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Label caption

    no I didn't mind at all-that's why I started the reply with :-)

  15. #15
    Forum Contributor
    Join Date
    02-26-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    367

    Re: Label caption

    Hi John and Joseph!, thank you so much! It's working now! Perfect! Thanks again!

+ 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