Hai,,,, i forget d vb concepts... plz help me...n what my problem is i hav a 2 list boxes and hav some numbers on that list.. my need is i want to deactivate the number in the second list box which one is present in the first list box.... this wil be happen after i choosen the number in the first list box..... tel me...... plz...
9 1265
Hai,,,, i forget d vb concepts... plz help me...n what my problem is i hav a 2 list boxes and hav some numbers on that list.. my need is i want to deactivate the number in the second list box which one is present in the first list box.... this wil be happen after i choosen the number in the first list box..... tel me...... plz...
Hmm you cant specifically deactivate specific items in a listbox well not without removing them but then you would have to renew the list afterwards something like this would be useful -
Private Sub List1_Click()
-
If List1.Listindex = -1 Then Exit Sub 'Check To See If Anything Is Selected
-
List2.Enabled = True
-
Call List2_Click() 'Makes List2 Click on the selected item in case List1 item is changed
-
End Sub
-
Private Sub List2_Click()
-
If List2.ListIndex = -1 Then Exit Sub 'Check To See If Anything Is Selected
-
if List1.List(List1.ListIndex) = List2.List(List2.ListIndex) Then
-
'If Both Selected items in List1 and List2 are the same then Exit the
-
'Sub so that no other commands will run.
-
Exit Sub
-
Else
-
'Do you commands here
-
'other commands
-
'other commands
-
End If
-
End Sub
-
I believe something like that will help you with what you are looking, so basically it checks to see if there is anything selected if not stop the code, then it checks to see if list1 and list2 are the same then exit sub to stop the code from continuing else... well you put your commands there.
Kind Regards
Devon.
Hai,,,, i forget d vb concepts... plz help me...n what my problem is i hav a 2 list boxes and hav some numbers on that list.. my need is i want to deactivate the number in the second list box which one is present in the first list box.... this wil be happen after i choosen the number in the first list box..... tel me...... plz...
u may use enable and /or locked property to do so
Thank u
actually what is my need is i want to deactivate the number in the list2 box which one is selected by the user in list1 box....
i think """if List1.List(List1.ListIndex) = List2.List(List2.ListIndex) Then """ this one is help ful for me...... u gave it na.... k... after this, wht i want to give to deactivate the particular no in list2 box......
Thank u
i knw i must want to use enable command..... but i studied vb 2 years back.... so slighly i forget the commands.... thats y i asked....
Dear use replay button to let the person know
sorry,,,, i have one doubt in your codings.....
u call list2_click() in list1_click(). And my need is after i select one number in list1 only same list 2 box no will go on to deactivate.... so please clarify my doubt.....
sorry,,,,,, i m the new one to this... thats y..... k........
Dear use replay button to let the person know
sorry,,,, i have one doubt in your codings.....
u call list2_click() in list1_click(). And my need is after i select one number in list1 only same list 2 box no will go on to deactivate.... so please clarify my doubt.....
see this is not my code but possibly might be
see this is not my code but possibly might be
k thx.....
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Rick |
last post by:
I am trying to stop the screen saver from running based on a external trigger
from our application.
I have a .Net application and I am using interop to make a
SystemParameterInfo() call to...
|
by: Seth Russell |
last post by:
I'm running Kevin Roth's rte box and i want to deactivate the ability
to past inside the box. People sometimes paste outrageous things in
there that might break my site. How can I deactivate the...
|
by: Maxine G |
last post by:
I have two forms, a menu and a data entry form. The entry form is bound
to a query against linked SQL server tables. In the deactivate event, I
have some code which asks the user if they want to...
|
by: henrycortezwu |
last post by:
Hi,
I would like to inquire on how to make an event that will simulate the
browser loosing focus, or the browser deactivate or inactive state
event. Like in Windows Form, there are several events...
|
by: active |
last post by:
I remember when I checked NewGroups for comments about the VB6 Activate
event and found that many thought it was not a reliable way to keep track of
which form has focus. There was enough bad press...
| |
by: Lance |
last post by:
By default it seems that there always must be an active MDI child form. But, I want to deactivate all of the MDI child forms when the user clicks on a control that is owned by the MDI parent. This...
|
by: ofzer |
last post by:
Hi ..
I wrote a windows application in perl/tk.
I would like to deactivate parent windows when I open new one.
for example :
lets say I am in the main window now and I press on the...
|
by: Arif Khan |
last post by:
I am getting folllowing error in one of the service components. I have not
override base class's (ServicedComponent ) Deactivate function. Also it's
library component called by asp.net worker...
|
by: subashini Thiyagarajan |
last post by:
Hi ,
In ASP how to deactivate few fields while inserting a record to the database(access).
i want to insert a record.e.g having 5 fields.it is not reqired to fill all the fields in a form as...
|
by: Andrew Morton |
last post by:
Is it possible to make a form deactivate itself without minimizing it?
I have written a small utility which copies selected files from CDs
(hundreds of them). I put a CD in the tray and click a...
|
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,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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,...
|
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...
|
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...
|
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...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |