Results 1 to 4 of 4
  1. #1
    Silver Lounger t8ntlikly's Avatar
    Join Date
    Dec 2001
    Location
    Chandler, AZ
    Posts
    2,162
    Thanks
    46
    Thanked 13 Times in 11 Posts

    Add Item (Exc3l 2003)

    I know adding an item to a list box has been covered, but I cannot seem to find the post. Anyone have it?
    Thanks John
    Teamwork is essential; it gives the enemy other people to shoot at. (Murphy's War Laws #39)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add Item (Exc3l 2003)

    What kind of list box?
    - A list box on a worksheet, created from the Forms toolbar.
    - A list box on a worksheet, created from the Control Toolbox.
    - A list box on a userform.
    The first type must always be filled from a worksheet range; the second and third type can be filled from a worksheet range, but also using VBA code.
    So we'll have to have more information before we can answer your question.

  3. #3
    Silver Lounger t8ntlikly's Avatar
    Join Date
    Dec 2001
    Location
    Chandler, AZ
    Posts
    2,162
    Thanks
    46
    Thanked 13 Times in 11 Posts

    Re: Add Item (Exc3l 2003)

    It is a list box created from the Forms Toolbar.
    Thanks John
    Teamwork is essential; it gives the enemy other people to shoot at. (Murphy's War Laws #39)

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add Item (Exc3l 2003)

    A list box from the Forms toolbar is always populated from a range of cells on a worksheet. You can define a dynamic named range and use that. As you add or remove items from the range, they will be added to/removed from the list box.

    Say that the list is in A1:A10, but you want to be able to add new items in A11, A12 etc. There should be no other data in column A.
    Select Insert | Name | Define...
    Enter a name, for example ListRange.
    In the Refers To box, enter a formula:

    =OFFSET($A$1,0,0,COUNTA($A:$A),1)

    Click OK.
    Right-click the list box and select Format Control from the popup menu.
    Activate the Control tab.
    Enter the name of the range (ListRange in my example) in the Input Range box.
    Click OK.

Posting Permissions

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