Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    clear a combo box (2003)

    How can I clear/ empty a combo box using code? When I select an item in a list box it populates the combo box, but if I click it again it populates it twice??!

    Thanks, Andy.

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

    Re: clear a combo box (2003)

    Do you want to clear the text box part of the combo box, or the list part?
    What is the Row Source Type property of the combo box?

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: clear a combo box (2003)

    Just the list part. The Row Source is Value List.

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

    Re: clear a combo box (2003)

    For a combo box named cboMyCombo, you clear the list in VBA as follows:
    <code>
    cboMyCombo.RowSource = ""
    </code>
    This sets the Row Source property to an empty string to clear the list.

Posting Permissions

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