+ Reply to Thread
Results 1 to 3 of 3

label overflow control, append "..."

  1. #1
    Registered User
    Join Date
    08-26-2010
    Location
    Colchester, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    label overflow control, append "..."

    this isn't a major issue but I am displaying target directories for saving a reading of two seperate workbooks on an userform. As the target directories could be x length is there a way of appending "..." when the label itself isn't big enough to display the path?

    If it's going to take a lot of work i'll just leave it as it's more cosmetic and not essential, but if there is something quick and easy i'd really appreciate a nudge in the right direction.

    All I can think of is counting and capping the characters and adding it if it exceeds x amount. how I would actually do this is beyond me..

    I know I can use something like:

    stringlength = Len(lbl_costing_location)
    if stringlength > 10 then

    But how would I chop of the excess characters and add "..." ???


    Thanks in advance for any help
    Last edited by lolelner; 09-07-2010 at 09:58 AM.

  2. #2
    Registered User
    Join Date
    08-26-2010
    Location
    Colchester, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: label overflow control, append "..."

    OK sorry to waste your time I found the answer with some more digging...


    Please Login or Register  to view this content.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: label overflow control, append "..."

    You need to store the full text some where so you can make use of it later.
    In order to chop the text use the LEFT function.

    One this a fixed length will not take into account is the variable width font being used.

    Here is a quick a dirty demo of resizing the label on the fly.
    Userform with a Label, textbox and command button.
    Enter test text in textbox and press button.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ 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