+ Reply to Thread
Results 1 to 3 of 3

last column does not resize to set width in listbox of a form

  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    last column does not resize to set width in listbox of a form

    why does the last column in a dynamic range added to a listbox not resize to the assigned column width?
    i used debug.print of column width and they are all set to the same size and same count as the column count
    but the last column in the listbox does not have the same size as the other columns

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: last column does not resize to set width in listbox of a form

    You need to adjust the size (width) of the 'ListBox' object to the total size of the existing columns in it.
    Partly this can be solved, for example, in this way as below:
    (but I don't think it will solve the whole issue, because for this you will need also to dynamically resize the 'UserForm' form)
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: last column does not resize to set width in listbox of a form

    thanks, I see now it is a problem of not having a fixed no. of column

    if the width of the listbox is less than the total width of all the columns then it sets the column widths correctly
    Last edited by k1dr0ck; 04-27-2023 at 07:57 AM.

+ 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. ListBox Column Width - Auto Resize according to text length that we get from the cell ?
    By garbanzonur in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-10-2022, 01:18 AM
  2. [SOLVED] VBA - column width and row heights resize themselves
    By dummy777 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2019, 11:13 PM
  3. [SOLVED] Resize Column based on header width
    By kersplash in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2017, 09:28 PM
  4. Is there a button to disable auto-resize column width?
    By scottyboy218 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-18-2017, 07:29 AM
  5. how to resize column width in the worksheets
    By aaaaa34 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2014, 07:55 PM
  6. Auto-resize Column Width
    By dk54 in forum Excel General
    Replies: 3
    Last Post: 03-29-2011, 10:55 PM
  7. Not showing column width during resize
    By branco in forum Excel General
    Replies: 2
    Last Post: 01-08-2010, 07:52 AM

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