in VB .net
how do I arrange that the items in a list box will be used in
calculations in a formula,
thanks in advance 7 1723
Hi Portroe,
Let the user select the row(s) and calculate with the item(s) the user has
selected.
That can with the click event from a button (multiselect) or just with an
event from the listbox, by example selected itdex changed
I hope this helps a little bit.
Cor how do I arrange that the items in a list box will be used in calculations in a formula,
Hi Cor,
can you possbly do this with a for... next loop, item by item?
thanks
Portroe
Cor wrote: Hi Portroe,
Let the user select the row(s) and calculate with the item(s) the user has selected.
That can with the click event from a button (multiselect) or just with an event from the listbox, by example selected itdex changed
I hope this helps a little bit.
Cor
how do I arrange that the items in a list box will be used in calculations in a formula,
Hi Portroe,
I thought yes in a multiselect, therefore you can have to look for the
selectedItems property
Cor can you possbly do this with a for... next loop, item by item?
* portroe <bo*@sleigh.com> scripsit: can you possbly do this with a for... next loop, item by item?
Set the control's 'SelectionMode' property to 'MultiExtended', then you
can use this code:
\\\
Dim Sum As Integer
For Each i As Integer In ListBox1.SelectedItems
Sum += i
Next i
MsgBox(Sum.ToString())
///
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
* portroe <bo*@sleigh.com> scripsit: how do I arrange that the items in a list box will be used in calculations in a formula,
What's your exact problem? Selecting the items, calculating, ...?
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
my problem is selecting the items which are sitting in a listbox,
I then want process each item inside a for... next loop to , with a
formula, placing each result in the next list box,
thanks
portroe
Herfried K. Wagner [MVP] wrote: * portroe <bo*@sleigh.com> scripsit:
how do I arrange that the items in a list box will be used in calculations in a formula,
What's your exact problem? Selecting the items, calculating, ...?
* portroe <bo*@sleigh.com> scripsit: my problem is selecting the items which are sitting in a listbox,
I then want process each item inside a for... next loop to , with a formula, placing each result in the next list box,
You can select items programmatically by calling
'listbox1.SetSelected(<item index>, True)'.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Simon |
last post by:
Hi,
I'm hoping you could show me examples of how a functional/declarative
language could be used to consicely describe resticted subsets of elements.
I'm looking for a 'specification' style...
|
by: NickB |
last post by:
Please could someone tell me what is wrong.
Ther error is:
An unhandled exception of type 'System.NullReferenceException' occurred in
microsoft.visualbasic.dll
Additional information: Object...
|
by: massimo |
last post by:
Hey,
I wrote this program which should take the numbers entered and sort them
out. It doesnąt matter what order, if decreasing or increasing.
I guess I'm confused in the sorting part. Anyone...
|
by: Rick |
last post by:
I want to add items to a list and then submit these items via POST in a
form. Below is my code and it adds the items fine but they are not selected
when I submit the form how can I have them all...
|
by: Jeremy Owens-Boggs |
last post by:
We are trying to implement a dual list box selection where you have two list
boxes, You highlight items in the right side list box, click a button and
this moves those items over to the left hand...
| |
by: Kriston-Vizi Janos |
last post by:
Dear Mr. Kern, and Members,
Thank you very much for the fast answer, my question became
over-simplified.
My source code is appended below. It uses two text files (L.txt and
GC.txt) as input...
|
by: puja |
last post by:
hi all,
I have a form which has checkbox list which has items as below
1) Input 1
2) Input 2
3) Input 3
4) Input 4
5) Input 5
|
by: Michael McGarry |
last post by:
Hi,
Please excuse me if this is not the right forum for this question. I
would like to create a random permutation of a list of numbers. How can
I do this in C?
I was just going to draw 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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
| |
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: 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...
| |