Results 1 to 3 of 3

Thread: [RESOLVED] Userform Listbox Unnecessarily Wide

  1. #1

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,427

    Resolved [RESOLVED] Userform Listbox Unnecessarily Wide

    I have a listbox on a userform that looks like this. The listbox width is set to 88 which is the smallest value that doesn't produce a horiontal scrollbar. Why does it need to be that large?
    Name:  2021-09-10_12-23-42.png
Views: 147
Size:  28.8 KB

  2. #2
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,416

    Re: Userform Listbox Unnecessarily Wide

    You have to set "ColumnWidth" explicitely (don't forget to calculate the offset for the Checkbox in relation to Listbox.Width --> i think 16 pts for the checkbox)
    Just did a check with Width=60 and ColumnWidth=44
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width