473,799 Members | 3,858 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Was the item selected or deselected?

In a simple multiselect listbox, what is the code for the AfterUpdate event to
determine if the item clicked on was selected or deselected?

Thanks!

Sally
Nov 13 '05 #1
1 1616

"Sally" <sm*****@earthl ink.net> wrote in message
news:JR******** ********@newsre ad2.news.atl.ea rthlink.net...
In a simple multiselect listbox, what is the code for the AfterUpdate event to determine if the item clicked on was selected or deselected?


the ListBox uses a zero-based array, but I believe that if you have Col
Heads set to true then you use an array beginning with "1" and not zero.

for x = 1 to listBoxName.Lis tCount - 1
if listBoxName.Sel ected(x) = False then
msgbox("Yeah, it's selected!!!)
end if
next x
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1424
by: Jeffrey Barish | last post by:
I have an application that produces two listboxes. I would like to be able to select one of the items in the first listbox and one of the items in the second listbox. However, when I make my selection in the second listbox, the selected item in the first listbox gets deselected. Is there a way to do this? I tried setting selectmode to MULTIPLE, but that option only allows me to select multiple items in one of the listboxes (both of...
1
2767
by: smash2004 | last post by:
I want to keep selected values in select list when i click on another option...with a click on a mouse... if i have 3 options in select list and i click first option..it gets selected..if i then click on third option ..it gets selected but i want also the first option to stay selected when i click on option that is already selected, then it should be deselected
2
7960
by: Peder Y | last post by:
Anyone knows if there is some kind of property or function that will return the last selected/deselected item/index in a multiselect ListBox? SelectedIndex will point to first index in the SelectedIndices collection, so this is a dead end. My solution so far is to override the mouse click and key pressed events. However, since arrow up/down seems to keep a record of the item that currently has focus somehow, I would believe this...
7
1482
by: Brian Henry | last post by:
I have a list box bound to a data set, of course the datasource,datamember, and valuemember are set, i tell it selecteditem = -1 to make nothing selected, select mode is set to only one item at a time. When the list fills the first item in the listbox has a background rectangle drawn but no focus rectangle (this is NOT a custom drawn listbox, just a standard one).. now i did set -1 as the selected item, but if i tab to the item the focus...
3
5753
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 selecting an item. I tried the following code but it displays the test message whether they're selecting or unselecting: For intRow = 1 To Me.lstEmployees.ListCount - 1 If Me.lstEmployees.Selected(intRow) = False Then MsgBox "Previously...
2
1431
by: cypher543 | last post by:
I have a TreeView and a ToolButton. The ToolButton should only be active if the user has selected an item in the TreeView. What signal should I use to achieve this? Thanks, David
2
2630
by: newfie912 | last post by:
I have an online application used for grading students. On one of the pages, I have a table with two rows and each row has 16 cells. The upper row contains the letter grade (A, A-, B+, B, etc) and the lower row has a 16 radio buttons for selecting the appropriate grade. This all writes to a SQL server back-end and has been working fine for several semesters. Some faculty members have complained that it is hard to read and see which...
2
2685
by: Academia | last post by:
I have a combobox that when it drops down the selected item is not highlighted. I'm guessing there is a property that controls this but can't find one. Is there? Should it always be highlighted?
5
2316
by: Doogie | last post by:
Hi, I have a listbox set up so users can select multiple choices. I want to limit them so they can choose no more than 4 at a time. I have set up javascript code to do the check on the number of choices selected but what I want to do is if they choose more than 4 (i.e. 5), I want to unselect the last item they selected. I cannot figure out how to determine which was the last item selected. function HasExceededMaximumYearWeekCount() {
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10029
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7567
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.