Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. how to delete items from combobox during run time?

how to delete items from combobox during run time?

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sumit21
    wrote on last edited by
    #1

    i have a form in which there is a combo box . i want to give user functionality to add and remove items from combo box at run time . add method is fairly easy but is the any method to remove or delete selected item from combobox. i want that user select an item from the combo box and when he press the remove button that item should be removed from my list. plz help me in this context sumit

    M 1 Reply Last reply
    0
    • S sumit21

      i have a form in which there is a combo box . i want to give user functionality to add and remove items from combo box at run time . add method is fairly easy but is the any method to remove or delete selected item from combobox. i want that user select an item from the combo box and when he press the remove button that item should be removed from my list. plz help me in this context sumit

      M Offline
      M Offline
      Mitch F
      wrote on last edited by
      #2

      Hello, The code to remove an item from a combobox at runtime is:

      ComboBox1.Items.RemoveAt(ComboBox1.SelectedIndex)

      I hope this helps, Programmer2k4 My sig: "And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright I now use my CodeProject Blog! Most recent blog post: March 24

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups