+ Reply to Thread
Results 1 to 4 of 4

Blank spaces in a listbox

  1. #1
    Registered User
    Join Date
    06-18-2005
    Posts
    17

    Blank spaces in a listbox

    Hi all,

    I've got a userform with a listbox. In the properties, I've selected the row source & it works as expected. My problem is when I delete an item out of the middle of that list, the listbow shows a blank space instead of skipping it. I've looked at all of the properties & there doesn't seem to be one that works on this, so I tried assigning the row source range in VBE, but I kept getting a message that the object was already in another module.

    Does anyone have an efficient way to fix this?

    Thanks

  2. #2
    Jim Rech
    Guest

    Re: Blank spaces in a listbox

    Did you delete a row or merely clear the cell? You must do the former.
    Also, be sure to assign a name to the list range and use the name as a
    RowSource. A cell address Rowsource like A1:A10 will not adjust if you
    delete a row in it, whereas a named range will.

    --
    Jim
    "Soundman" <[email protected]> wrote in
    message news:[email protected]...
    |
    | Hi all,
    |
    | I've got a userform with a listbox. In the properties, I've selected
    | the row source & it works as expected. My problem is when I delete an
    | item out of the middle of that list, the listbow shows a blank space
    | instead of skipping it. I've looked at all of the properties & there
    | doesn't seem to be one that works on this, so I tried assigning the row
    | source range in VBE, but I kept getting a message that the object was
    | already in another module.
    |
    | Does anyone have an efficient way to fix this?
    |
    | Thanks
    |
    |
    | --
    | Soundman
    | ------------------------------------------------------------------------
    | Soundman's Profile:
    http://www.excelforum.com/member.php...o&userid=24428
    | View this thread: http://www.excelforum.com/showthread...hreadid=396117
    |



  3. #3
    Dave O
    Guest

    Re: Blank spaces in a listbox

    How about a quick bit of code that runs on startup and sorts the
    relevant range?


  4. #4
    Registered User
    Join Date
    06-18-2005
    Posts
    17
    Thanks for your help. I'll give it a try.

+ 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