Solved

listbox delete selected item help

Posted on 2001-08-28
3
177 Views
Last Modified: 2011-10-03
i have a listbox called "lstCities" and when i select a city and click on cmdDelete, it deletes that selected item.


Can someone post the simplest code to do this  A.S.A.P



cheers
0
Comment
Question by:penfold69
  • 2
3 Comments
 
LVL 1

Expert Comment

by:DonBartholomew
ID: 6431469
Ok, it's just this:

Listbox.RemoveItem(Listbox.ListIndex)

Don
0
 
LVL 1

Accepted Solution

by:
DonBartholomew earned 100 total points
ID: 6431475
Ok, it's just this:

Listbox.RemoveItem(Listbox.ListIndex)

Don
0
 
LVL 12

Expert Comment

by:roverm
ID: 6431558
penfold69:
duplicate question!
please remove this one!

experts:
please continue at:
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20174922
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question