+ Reply to Thread
Results 1 to 9 of 9

combobox/drop down list extra left margin

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    liktarus
    MS-Off Ver
    Excel 2007
    Posts
    6

    combobox/drop down list extra left margin

    in a userform when you add a combobox/drop down menu, then adding some items in it,
    opening the list, there is extra space at the left of the each menu item,
    how can I disable these extra spaces?

    The combobox/drop down left margin in the box itself can be disabled via setting selectmargin to false.
    but how can I disable these spaces within the list? the url below show this extra space.

    http://i.stack.imgur.com/z0qPd.jpg

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combobox/drop down list extra left margin

    Those spaces aren't in the list.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    liktarus
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: combobox/drop down list extra left margin

    what do you mean? I haven't added those spaces to the list,
    they are showing by default,

    a simple code like
    myuserform.mycombo.additem "first" and etc.
    put these spaceless items to the combo, but when showing they have that margin you see in the pic.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combobox/drop down list extra left margin

    Neither has VBA/Excel added any spaces.

  5. #5
    Registered User
    Join Date
    08-17-2012
    Location
    liktarus
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: combobox/drop down list extra left margin

    ofcourse, you are right, i was talking about removing those margins from left side. I want it to be visually perfect,
    the added items are fine, just i don't like them to be shown with margin. thats all. any idea?

    regards.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: combobox/drop down list extra left margin

    Not that I can think of.

    Setting SelectionMargin doesn't seem to do much and I can't see any other properties that might help.

    I've tried playing about with a few things but just ended up with a really ugly combobox.

  7. #7
    Registered User
    Join Date
    08-17-2012
    Location
    liktarus
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: combobox/drop down list extra left margin

    yeah, me too, thanks anyway, guess it is what it is...

  8. #8
    Registered User
    Join Date
    11-11-2018
    Location
    melbourne
    MS-Off Ver
    2010
    Posts
    1

    Re: combobox/drop down list extra left margin

    Hi, anyone got answer for this, please

  9. #9
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: combobox/drop down list extra left margin

    thilag80
    Unfortunately your post does not comply with Rule 4 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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