Code For Loan Calculations Not Calculating Properly
Oct 11, 2010I am coding a loan payment application and when I run the application the loan calculations are incorrect.[code]...
View 1 RepliesI am coding a loan payment application and when I run the application the loan calculations are incorrect.[code]...
View 1 RepliesDue to the way I currently have it setup, the calculations are not being excecuted properly. I've been tweaking for a while and haven't gotten it yet. I think the problem is that certain equations are being done before certain terms are defined. If I click the calculate button multiple times, it works fine, but I need it to function on the first click.
Take a look:
Public Class frmford
Dim Make, Model, InitialPrice, Options, AirConditioningTax, GST, PST, Total, Subtotal, APR, Months, RoofRack, SunRoof, SideAirBags, TintedGlass, RearSpoiler, GPS, PowerLocks, FreightAndPDI, AirConditioning As Single
[CODE]...
I cannot figure out why my calculation is not working. I am doing for 1 to 12 and it gives me 12 inputs but counts my entries as 13? What am I missing. If I change it to 0 to 11 same thing. I am not sure what the issue is, but I cannot see it, and am not sure where to look.I need to end up with 12 cycles through and intEntries to be 12.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'initialize accumulator
Dim decEntries As Decimal[code].......
What I want to do is to add a new student loan and the program checks the book title if loan exists, does not allow the same loan to be created. There is no limit on the number of loan placed by the student. How do I write the code as above in VB.NET Note: 1 book Per Loan number Add Loan Form
View 1 RepliesThe Question sound like this.Assume the theater keep 20% of its box office receipts. Use the Following test data to determine if the Application is calculating properly :
[Code]...
I wrote a Visual Basic program using the PMT function to calculate the monthly payment for a loan. Also calculate the Total of All Payments made over the term of the loan. This is how it should work, The user will input the loan amount in a text box. The user will use horizontal scroll bars to input the term of the loan (years), and the rate of the loan. As the user clicks the scroll arrows for years and rate their values display on the form above each scroll bar. When the user clicks the Calculate button the program will output values for the amount of the monthly payment and the total of all payments for the term of the loan. The two scroll bars are set to their mid-points (15 years and 10%), I am unable to get to show this values in their respective text boxes for some reason. [Code]
View 3 RepliesHere is the problem. I am to write a VB program that will take a Loan of $563 that is to be paid off with 5 monthly payments of $116. The interest Rate is 1% per month. I need to display a table giving the number of months and the balance on the loan after each month.The Table displayed should look like this:
Month Amount Owed
1 $452.63
2 $341.16
3 $228.57
4 $114.86
5 $0.00
Here is my code but I do not understand why it only shows "Month" and "Amount Owed" and nothing else.Maybe someone can point me in the right direction and I can figure it out.
[Code]...
o change this template use Tools | Options | Coding | Edit Standard Headers.'
Option Explicit On
Option Strict On
Public Partial Class MainForm
[code].....
Can someone help me figure out why my calculations do not come out right? I have many notes so it is easy to understand. The assignment is: "Create a windows app for the rental of a vehicle. User selects number of rental days up to 7 days. The user also 'can select one of three types of vehicles. Customer has a choice of filling the gas tank themselves,'or prepaying for a full tank of gas ($52). If vehicle will be driven by more than one driver, a multiple'driver cost of $22 per day will be added to the cost." [code]
View 4 RepliesI'm having trouble figuring how to code the calculations for a Pocket PC application that calculates the cost of a cell phone bill. From a Pocket PC the user should enter the number of minutes used during the past month, in order to calculate the cost of the cell phone bill. The plan allows 300 minutes for $29.95 per month. For each minute over 300 the cost is $0.17 cents per minute. Tax and Fees are $4.85 a month.
1. User enters the number of minutes used during the past month.
2. Based on plan rate of 300 minutes for $29.95 and 17 cents for each minute over 300 calculate the cost of the bill including the fixed cost of $4.85.
3. The user must be able to initiate the calculation and display the individual charges and the total cost of the cell phone bill.
4. The user should be able to clear the number of cell phone minutes, the individual charges and the bill total
If negative number is enterd for the cell phone minutes, the user should be advised and asked for a valid entry If non numeric value entered for the cell phone minutes, or if left blank the user should be advised and asked for a valid entry.Application is deployed on the Pocket PC emulator built in VS 2008
Enter # of Minutes ________ (user enters)
Regular Minutes Charge ___ (29.95)
[code]....
5 records to add
Try
Do While
Insert Statement
[code]....
When i get an error concerning duplicated values found, it just catch the sqlexception, display a message and exit try. But i want it to continue adding the remaining record even when a record of duplicated values is found.
I got the following code from net,its working sometimes but sometimes not working, why?Its not showing the video by every click of the button Preview.I want some better code which will work smoothly and will show the video by every click. [code]
View 4 RepliesI am using VB 06 code for MS winsock and no im not supprised its not working properly but I cant find any tutorials anyware for VB 08 and its starting to anoy me. I have managed to reorginise some of the code so it works but im at a loss to know what to do to correct these errors. .
Send Button
sckmain.SendData("[" & txtname.Text & "]" & txtsend.Text)
txtlog = txtlog.Text & "[" & txtname & "]" & txtsend.Text & vbCrLf
txtsend.Text = ""
Host Button this works:
sckmain.LocalPort = txtport.Text
sckmain.Listen()
Connect button this works:
sckmain.RemoteHost = txtip.Text
sckmain.RemotePort = txtport.Text
sckmain.Connect()sckmain.RemoteHost = txtip.Text
[CODE]...
Connection request
If sckmain.State <> sckClose Then
sckmain.Close()
End If
[CODE]...
I am trying to figure out how to properly code to create a Commission Calculator. Is anyone able to provide assistance? I will provide the code here:
[Code]....
I am trying to call back to a code behind method using Javascript and it seems like the only way to do so is using the Page.ClientScript.RegisterClientScriptBlock() don't need to return any data back to the calling javascript function.
View 1 Repliesi'm working on a project that is trying to calculate the discount on three different kind of packages, each worth different prices.
what we are given is
package A= $99
package B= $199
[code].....
Does anybody know the code to refresh and reload desktop icons, you know how after installations of programs it sometimes refreshes the desktop? That is exactly what I need and what I am looking for. Someone please help me out here because I tried searching on google and could not find any proper code.
View 5 RepliesI am looking for a code snippet which opens a image, creates a clone of this bitmap in memory disposes this opened image so that all handles are closed.
Usually we can open a bitmap using this[code...]
the following code however keeps the Image File locked until the application is running, any suggestions how to dispose it properly. (So that no handle is left open )
Things i already tried: use dispose method of bitmap <= doesnt work (need to write implementation)
Using Block also doesnt work.
So i've to write this program whose purpose it this:
Purpose: The user enters the item name and amount of the item purchased. The program calculates the tax for the item and the final total, and then displays these values. Tax on all items will be 7.75%.
And so far i've this code but it's not working:
' Program: Cash Register
' Author: Nidhi Shah
' Date: February 2, 2010
' Purpose: The Cash Register Window application will
' computer the tax and the final cost of a
' purchased item.
Option Strict On
Public Class frmCashRegister
' Tax per item - used in multiple procedures
Const _cdecTaxPerItem As Decimal = 0.0775D
[CODE]...
I started this tutorial on sub procedures and am having trouble trying to get this program to execute properly. The problem lies with the total. I am trying to figure out the math part of it. When I hit F5 I can see this
Item Quantity Price.
Pizza Slices
Fries
Soft Drinks
Total
But I can't get them to add up and display the quantity and price. I tried the ByVal and ByRef code but am not sure if I did it right
Here is the code that I have so far:
Public Class Form1
Private Sub btnCompute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCompute.Click
Dim pizza, fries, drinks, total As Double
[CODE]...
I am trying to program that is based on calculating the loan based on the balance of an item after the deposit. Then I must display certain information in a listbox. I am having a problem
Dim buyername As String
Dim cartype As String
[code]....
I get a credit loan for 2500 with 10 percent interest rate. I pay $150 a month to pay off the loan. How many months does it take to pay off the loan? I also have to show the new balance at every step Well I know it's 19 months in this case. I tried to do it, but I get many arithmetic overflow errors!![code]
View 4 RepliesI have the following problem: I get a credit loan for 2500 with 10 percent interest rate. I pay $150 a month to pay off the loan. How many months does it take to pay off the loan? I also have to show the new balance at every step. Well I know it's 19 months in this case. I tried to do it, but I get many arithmetic overflow errors!!
Here is my code so far:
Dim loan As Integer = 2500
Dim intrate As Double = 0.1
Dim payment As Integer = 150
Dim interest As Double
Dim newbalance As Double
[Code] .....
I need to find the total of all payments at the end of the loan period.example, Mr. X borrows $100,000 for 15 years at the rate of 10%. The total of all payments is supposed to be $193,428.92.
View 2 Repliesi'm making a program to calculate loan using dates, the customer borrows an item on a particular day and returns it on a given day else he would have to pay a certain amount of fine per day, which starts from the date of return if the user returns the item 1 day after the Date of Return, he pays a fine of 50pence if the user returns the item 3 days after the Date of Return, he pays a fine of 25pence per day if the user returns the item 10 days after the Date of Return, he pays a fine of 10pence per day and if the user returns the item 30 days after the Date of Return, he pays a fine of 5pence per day i did something like this, but it's not producing the required answer
Dim returned As Date
Dim due As Double
Dim fine As Double
[Code]....
how do i format a datetime in a textbox?
I have an assignment where I have to use financial.pmt to take input of a loan amount, interest rate, and term and display the monthly payment, total interest paid and total payments.
[Code]...
Our book doesn't talk much about the financial.pmt method. Can I use it to find the interest paid and total payments, or do i have to do that part with regular math like I've done?
Monthly Loan payment calculated perfectly but still I'm stuck with fixed 2 week payment frequency for individual loan for example: if I a customer want to borrow $2000 and he/she want that loan amount to be paid off within 8 month technically by Biweekly payment frequency type!
For period As Integer = 1 To mPayments
iPayment = IPmt(APR, period, mPayments, -PVal, FVal, 1)
pPayment = PPmt(APR, period, mPayments, -PVal, FVal, 1)
lstLoanInterest.Items.Add(FormatCurrency(TotPrincipal).PadRight(25) & FormatCurrency(iPayment).PadRight(25) & FormatCurrency(dblBalance).PadLeft(25))
[Code] .....
I have problems with the formula, it dosent seem to work, and i also have problems, why its not storing in the gridview?
Private Sub btncalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncalculate.Click
Dim LoanAmount As Decimal
Dim LoanRate As Decimal
Dim Interest As Double
[CODE]...
I have to show monthly paymen in label, make sure the user has entered an amount greater than 100, If user changes amount or rate or number of payments have label with answer cleared, When user Click on the text box have ente amount highlighted so user can type right over what was already written
I need to calcuate the button Also I need to be able to concatenate "Your monthly payment is (whatever the principal amount is) loan for(years) years at a rate of (whatever the %) is $ (whatever the monthlyPaymen)
[Code]...
i want to deduct some amount(i.e user input) from main loan taken by employee and remaining amount again come as balance loan amount and on nxt month again the some amount should deduct from balance loan amount.
my database is in ms-access and i use vb.net..