Getting Values From Listbox And Using In Formula?
Mar 30, 2011
I'm trying to create a calculator that does this formula : Amount=Principal*(1+InterestRate) The point of it is to Calculate the compound interest earned over however many years the user selects between 1-15 from a listbox. The user also inputs the investment & interest rate. When calculate is clicked the results show in another listbox below.
year 1 $$$$$$
year 2 $$$$$$
etc
[Code]....
I stopped the code at Year 2 as it repeats the ElseIf to EndIf unitl selectedIndex = 15 & intYear 16.
it works for Year 1 but the problem comes with Year 2-15. it needs to take the value from the previous result in lstOutput and use it in the formula for principle.
View 1 Replies
ADVERTISEMENT
Oct 11, 2011
Using VB.Net (Windows Application)[cod]e...
f1 = a + b * c means i have to pass the value a = textbox1.text, b= textbox2.text, c = textbox3.text
View 1 Replies
Dec 23, 2010
i am currently making a project which is to make a cinema screen booking system. Im a beginner of course`*My main problem is that although i have most of what is working i need to find a formula to give the full result (overall price) in a label.*My other problem is the fact that when i interact with my form certain things dont auto refresh when i change certain values e.g i change number of seats but it doesnt auto refresh the price from times1 to times2. OR i click one discount radiobutton which works then another after but nothing changes and it keeps the first radiobutton's value.Okay in my menu i have a ComboBox (ComboBoxScreen) for choosing the film and there are 3 films to choose from in the drop menu each with their own price.I also have a Textbox (NumberSeats) for inputting a number of seats you want to book for the chosen film.And lastly there are 3 radio buttons each with different discounts.. e.g No discount, 10% off and 25% off. If selected each gives discount to full price.A formula to work out the overall price uses all three functions/tools above.My current code for the combobox and radiobutton part is as follows: [code]
View 1 Replies
Jul 6, 2011
i am currently making a project which is to make a cinema screen booking system.My main problem is that although i have most of what is working i need to find a formula to give the full result (overall price) in a label.
My other problem is the fact that when i interact with my form certain things dont auto refresh when i change certain values e.g i change number of seats but it doesnt auto refresh the price from times1 to times2. OR i click one discount radiobutton which works then another after but nothing changes and it keeps the first radiobutton's value.Okay in my menu i have a ComboBox (ComboBoxScreen) for choosing the film and there are 3 films to choose from in the drop menu each with their own price.I also have a Textbox (NumberSeats) for inputting a number of seats you want to book for the chosen film.
And lastly there are 3 radio buttons each with different discounts.. e.g No discount, 10% off and 25% off. If selected each gives discount to full price.A formula to work out the overall price uses all three functions/tools above.My current code for the combobox and radiobutton part is as follows:
QuotePublic Class txtSeats 'name of form of which is being used'
Private TEN_DISCOUNT_Decimal As Decimal = 0.1D
Private TWENTY_DISCOUNT_Decimal As Decimal = 0.25D 'percentages?'
[code]....
Where FilmCost is the price of each individual film (one is £4.25 shown above)OR lblCost is filmprice times seats.Where TotalDiscount is the discount worked out.Where TotalCost's is a value that can be shown in a label as the overall price.
View 4 Replies
Apr 4, 2011
I'm in need of some help trying to figure out the RegEx formula for finding the values within the tags of HTML mark-up like this:
<span class=""releaseYear"">1993</span>
<span class=""mpaa"">R</span>
<span class=""average-rating"">2.8</span>
<span class=""rt-fresh-small rt-fresh"" title=""Rotten Tomatoes score"">94%</span>
I only need 1993, R, 2.8 and 94% from that HTML above.
View 2 Replies
Feb 20, 2009
I want to place two radio buttons in so I can select one of them to use one formula, and then select the other to use another formula. I want to use the I=P(1+r)^n formula and I=P(1-r)^n formula with the radio button text showing Appreciation and Depreciation.
Heres my copy of the original code.
Public Class Form1
Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
End
End Sub
[CODE].......................
View 5 Replies
Jul 10, 2009
I have bound a listbox with a dataTable Now i want to move the values from the listbox to another listbox.i have changed the selectionMode of the listbox to multiple.So they choose multiple items and they get moved over to the other listbox.
for each item in listbox1.selecteditems listbox2.items.add(item) next
i get system.data.datarowview in the listbox2 how could i replace that with the actual value ?
View 1 Replies
Jan 14, 2009
I am very new to vb.net. I have been using vb6 for a while and I am making the leap.I have a list box that receives entries from another text box, there will be multiple entries, and only some will be applicable per record(its a report writing app).e.g. The user says ok I need this and that signer for this record.
lstSigners.Items.Add(strSigner + strSigner)
The entries that are needed are then selected via checkbox in the listbox. I now need to be able to capture which items the user selected.
View 5 Replies
May 9, 2009
I have a ListBox which is retriving mathematical data form a Texbox. I would like to know how to get the ListBox to automatically calculate all the mathematical data (finding the sum of all the data )
View 1 Replies
Apr 1, 2010
The following is the code that i used to store all the values in the listbox ito the access database.but it is not working.I didn't get any error.but the values in the listbox is not being stored in the database.The field in sample table that stores the value from listbox is a multivalue field.[code]...
View 2 Replies
Oct 10, 2009
..i am working in my project i am having problem in the list box part.. .
[Code]....
View 8 Replies
Jun 9, 2011
I am using asp.net with vb.net. I have created 2 listboxes; lstselect and lstroles. List boxes lstselect contains all of the available roles that can be added into lstroles. How do I take the roles that have been added into lstroles and make them into a parameter to pulled into my database when the stored procedure runs?
Here is the code for how my list boxes share the roles:
Protected Sub btnRight_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRight.Click
If lstselect.SelectedIndex <> -1 Then
[Code]....
View 1 Replies
Jun 29, 2009
I have five listboxes that are populated from five different datasources basically I have connected to an MS Access database and I am running SQL queries effectively so the five listboxes are populated via datatables for example dtInterests, dtHobbies, dtMovies, DtTV and dtMusic my question is how would I compare the values that are being stored in each listbox I want the application to check each of the five listboxes and if the value is the same (in my case the valuemember is the customer id) then store the result somewhere (in a textbox)
View 5 Replies
Apr 28, 2011
So i have some HTML like this[code]...
My problem is, i want to also get div id="2" value at the same time and add it to my listbox, since the Persons ID is in div 1 and the Name of the person is in Div2.
I was thinking i could do another for each loop, and just add the username behind the id i pull.
Question is, how do i add to a value or position in a listbox, after its been filled?
View 6 Replies
Mar 3, 2010
I have a list box which gets populated on the first run of the program by the user. On the next run it needs to be completely cleared so new values can be displayed.
View 2 Replies
Sep 25, 2009
i have constant declared in form1.
View 5 Replies
Oct 16, 2011
I need to put numeric values (only numeric, I should control that all numbers inserted are DOUBLE) and put in a listbox by the following criteria:
1-At the top
2-At the final
3-BY NUMERICAL ORDER (I tried to put it in Sorted=True but puts that 122 is lower than 22...)
How could I solve it? And how could I control that?
View 13 Replies
Feb 25, 2009
I have a listbox, and its like this:
13
45
sdfg
34
13
And a button, which I want to search if the listbox has atleast 2 same value's [13 , 13], and delete it. So It will be:
13
45
sdfg
35
View 2 Replies
Dec 21, 2010
I am facing a problem which I don't know how to sum up or use a function on all the values listed in ListBox.I am still new in Visual Basic so I need some help and I hope it is as simple as possible.This is a function of counting equivalent capacitance value of a combined circuit, the values are listed in listbox and I want to use a function.This is the code for my function part, I know it sounds silly but I have no any idea of coding it.[code]
View 11 Replies
Jul 26, 2010
i have one fill box and 2 radiobuttons in my form. I also have a database in which I have a table with names of workers, their smoking and marital status. My aim is to choose from radio button 1 if worker is smoking (yes or no) and radio button 2 if the worker is married (again yes or no). According to the selection, the list of workers matching with the selected criterias should be shown in the listbox1. Here is the code I wrote and I do not know how to complete or correct:
[Code]...
View 11 Replies
Sep 16, 2011
Before I begin, want to say this is my first post and I am a newbie. My first time using VB. How can I add values in a listbox that were entered by a user to another textbox in total?For ExampleSay my code for now is this.
ListBox1.Items.Add(textBoxValue.Text)
Dim X As Double
X = textBoxValue.Text
[code].....
View 7 Replies
Nov 19, 2011
I have a listbox in which i have to display the first column of the table.
cnString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=AirLine.mdb"
Dim sqlQRY As String = "SELECT flightId FROM FlightDetails"
[code].....
View 7 Replies
Jul 3, 2012
I Know how to Search in a Listbox[code]...
While user enters character "w" then "w" should appear in the textbox.Now if user enters character "h" then "wh" should appear in the textbox .Now suppose user enters character "e" Then "wh" should remain with a beep means "e" should not be written in the textbox.
View 14 Replies
Jun 4, 2009
I have a listbox that prints 2 different values each line. The first one is String and the second one is an Integer, (although I've converted it to String). How do I extract the first String value? One is suposed to be able to mark one line, and remove the selected lines values from 2 different arrays, and for that I need the String value.
View 2 Replies
Jan 16, 2012
I am loading a listbox with lines from a txt file. Now I would like to be able to edit values within that listbox by going there with the mouse cursor and type a new value..
E.g. the listbox displays:
7226218; Hemlock; 22.55; 4
0822722; Pine, Sugar; 11.55; 7
After editing it looks like:
7226218; Hemlock; 22.55; 2
0822722; Pine, Sugar; 11.55; 7
After pressing an "accept button" those values should then be written back to the txt file.
View 9 Replies
May 23, 2010
I am working on Visual Studio 2005, VB.At the back end,there is a table called "Marks" which has a column called "Subject". This column contains duplicate values.when the form loads,I want to display all the distinct values from the "Subject" column in the listbox.
View 2 Replies
Apr 27, 2012
We have a listbox in our MVC View and the user has the ability to highlight multiple values. I'd like to be able to save those selected values(if possible?) as a comma delimited cell value in our '08 SQL Database.
The image below shows what I am attempting to explain. Note the selection in the LISTBOX
This is where we save the passed in values from the Positionnumber DDL (Listbox w/ mulitple highlights).
> <HttpPost()>
> Function Edit(wsmonitor As WSMonitor, ByVal vbpositionnumberDDL As Integer, ByVal PassedCounty As Integer, ByVal
> MonitorTypeDDL As String) As ActionResult
[Code]....
View 1 Replies
Apr 3, 2011
I need to sort the values of my listbox to have the latest date on top plus some text
I used a reference I found here on the forum but I can't get it to work properly.[code]...
View 2 Replies
May 15, 2009
Well, i have the listbox... and it has the colors
Black
Brown
Red
Orange
[code]....
now the code works like this
color + color * color = resist value
well, i need to give say black the value of 0 and brown 1 and red 2 and so on...How to I assign value to it?
View 6 Replies
Dec 16, 2011
I'm building some lists of selected values from listboxes; it's easy to retrieve the text like so:
For Each item In Listbox1.SelectedItems
ParameterList.Add(Listbox1.GetItemText(item))
Next item
What is the corresponding way to return the value rather than the text, in the event that they're different?
View 5 Replies