473,387 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Remove item from list after selecting

I am trying to create an NFL pick'em program for some the upcoming season. I am trying to do this using combo boxes. The rules are that you can only use a team once until you have used every team. I can't figure out how to set up the combo box to remove the selected team from the list. There will be several players, so each list of available teams will be different. If someone can help me set it up for 1 user, I can so the rest for the other players. Is this possible to do without combo boxes, ie. just by typing in the team excel will check if that team has been selected an bring up a message prompting an error. There will be 3 picks per week, so week 11 pick 3 will have all teams available. Thanks for the help!
Jul 12 '07 #1
2 1741
kadghar
1,295 Expert 1GB
to remove an item from a combo box, just remember

combobox1.list(n) will select the (n-1)th item, since the indexes start from zero.

Combobox1.listindex is the selected item... so just add to a sub:

combobox1.list(combobox1.listindex).delete

and you're done eliminating the selected item ^.^
Jul 12 '07 #2
Killer42
8,435 Expert 8TB
I believe this is version-specific. If you happen to be using VB6 (or earlier), you would use the ComboBox.RemoveItem method.
Jul 12 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sean Chapman | last post by:
I was wondering how I would go about programmincally selecting a listView item in a listView since the Selected val is read-only. I can't seem to find any other method that will do this for me. I'm...
4
by: Ron | last post by:
I've got a listbox that holds a list of groups. Users can select a group, hit the remove button and the group should be removed from the listbox. The only problem is that no matter which group you...
3
by: manning_news | last post by:
Using 2003. How do I tell if a selected item on a multi-select listbox is now unselected? If a user unselects an item, I want to prompt them that they've unselected it. No prompt if they're...
0
by: koti | last post by:
hi i have written some code for selecting an item in combobox dropdown list which is in datagrid columm. by scrolling the mouse we select any item from the list. but by pressing the down key...
2
by: Kela | last post by:
An interesting problem: I have a ListView with LabelEdit set to TRUE. When I change the label, I want to make some decisions as to whether the ListViewItem (that's just been edited) should stay in...
10
by: pamelafluente | last post by:
Hi I have a sorted list with several thousands items. In my case, but this is not important, objects are stored only in Keys, Values are all Nothing. Several of the stored objects (might be a...
1
by: dvestal | last post by:
I have a ListView with checkboxes. I want to remove items when the checkboxes are unchecked, but to do so yields an ArgumentOutOfRangeException. Is there an easy way to get around this? A...
4
by: darrel | last post by:
I have a DDL list along these lines: item value="1" text="a" item value="2" text="b" item value="3" text="c" item value="2" text="d" item value="2" text="e" item value="1" text="f" item...
4
by: Yansky | last post by:
Got a quick n00b question. What's the difference between del and remove?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.