+ Reply to Thread
Results 1 to 2 of 2

RemoveItem - ComboBox

  1. #1
    Mike
    Guest

    RemoveItem - ComboBox

    Hi!

    I am trying to remove items from combo box (with 8 items), so I wrote this
    macro:

    For i = 0 To 8
    Sheet1.ComboBox1.RemoveItem i
    Next

    and it breaeks down at 4!
    actually, it always removes only half of the items in combo box
    I tried it with 20, 100 .... and it doesn't matter!

    Does anybody have an idea how to make work it

    Thanks!!!

  2. #2
    Tom Ogilvy
    Guest

    RE: RemoveItem - ComboBox

    For i = 8 To 0 step - 1
    Sheet1.ComboBox1.RemoveItem 1
    Next

    0 to 8 is 9 items. If there are actually only 8, then start at 7.

    --
    Regards,
    Tom Ogilvy



    "Mike" wrote:

    > Hi!
    >
    > I am trying to remove items from combo box (with 8 items), so I wrote this
    > macro:
    >
    > For i = 0 To 8
    > Sheet1.ComboBox1.RemoveItem i
    > Next
    >
    > and it breaeks down at 4!
    > actually, it always removes only half of the items in combo box
    > I tried it with 20, 100 .... and it doesn't matter!
    >
    > Does anybody have an idea how to make work it
    >
    > Thanks!!!


+ 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