473,322 Members | 1,473 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,322 software developers and data experts.

Question to b answered in 10 minutes or less

Ok. I have a project that figures out payments of an
item. I just can't find the code to only get rid of the
negative balance in my list box if there is a negative
balance. Help Please.
Nov 20 '05 #1
2 828
"Erik" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
Ok. I have a project that figures out payments of an
item. I just can't find the code to only get rid of the
negative balance in my list box if there is a negative
balance. Help Please.


Well this sort of thing is simple enough. Wire up an event to the ListBox
change event. In the sub for that event, Dim a Decimal, assign it the value
of Decimal.Parse(ListBox.SelectedItem.Value) and if the value < 0 reset the
value to the desired positive value.

R.
Nov 20 '05 #2
* "Erik" <an*******@discussions.microsoft.com> scripsit:
Ok. I have a project that figures out payments of an
item. I just can't find the code to only get rid of the
negative balance in my list box if there is a negative
balance. Help Please.


What's the problem?

You can convert an item to a number:

\\\
Dim d As Double = Double.Parse(DirectCast(Me.ListBox1.Items(1), String))
///

You can remove an item using 'ListBox1.Items.Remove(...)'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

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

Similar topics

65
by: perseus | last post by:
I think that everyone who told me that my question is irrelevant, in particular Mr. David White, is being absolutely ridiculous. Obviously, most of you up here behave like the owners of the C++...
33
by: John Timbers | last post by:
I'd like to purchase Visual C# .Net for learning purposes only since it's a lot cheaper than Visual Studio (note that I'm a very experienced C++ developer). Can someone simply clarify the basic...
55
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's...
8
by: Alex | last post by:
ACC 2000 I am having problems working out how to adding up minutes? Example:using short time Date Timestart Timend Minutes 25-jan-04 15:00 16:00 60
4
by: Jordan Wright | last post by:
I am wondering why it takes an absurd amount of time for a message to post on here, and also why the most recently answered topics aren't automatically reposted at the top. I keep seeing my message...
5
by: Markus Ernst | last post by:
Hello A class that composes the output of shop-related data gets some info from the main shop class. Now I wonder whether it is faster to store the info in the output class or get it from the...
34
by: =?Utf-8?B?U3RldmUgQnVnZGVu?= | last post by:
Hi, I recently had an interview where I was asked a number of questions on C#. Unfortunately I didn't get the answers from the test and find that one of them is still niggling me. It was...
1
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have a question that is not answered in here or in any of the resources mentioned here but I'm sure it has...
13
by: Bryan | last post by:
Hi, I just started with python, and have a for loop question In c++ (or a number of other languages) I can do this: for (int i=0, j=0; i < i_len, j< j_len; ++i, ++j) {} If I have this in...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.