Click here to Skip to main content
16,017,788 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: App config help Pin
Joey Picerno2-May-05 12:51
Joey Picerno2-May-05 12:51 
GeneralRe: App config help Pin
Het21092-May-05 18:43
Het21092-May-05 18:43 
GeneralKilling child processes Pin
Sam Marrocco2-May-05 8:29
Sam Marrocco2-May-05 8:29 
GeneralGet variables set in a SUB Pin
mike2k52-May-05 8:19
mike2k52-May-05 8:19 
GeneralRe: Get variables set in a SUB Pin
Het21092-May-05 18:48
Het21092-May-05 18:48 
GeneralSeperate decimal from whole number Pin
vertig07302-May-05 7:19
vertig07302-May-05 7:19 
GeneralRe: Seperate decimal from whole number Pin
chrismerrill2-May-05 7:49
chrismerrill2-May-05 7:49 
GeneralMortgage calulator loop question vb.net Pin
vb.net challenged2-May-05 6:16
vb.net challenged2-May-05 6:16 
I am working on a mortgage calculator program in VB.net. I have created it and can input loan amount, interest rate, term and get what the monthly payment will be. The next thing I need to do is allow it to list the new loan amount and interest paid for each period of the term of the loan. I think I need to use a loop and since it will display 15 years of payments and results I need it to display partial list, hesitate, then display more of the list. I have placed a list box and am trying to get the result for the first monthly payment to subtract from the total loan amount and then display the new amount in the list box. I need help in writing the loop that will allow this to occur. Can someone help me out with this? Here is where I am now

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click

'Calculate the Monthly Payment'

Dim dblAmount As Double

Dim dblMonthlyRate As Double

Dim dblMonths As Double

Dim dblMonthlyPayment As Double

'Convert input values to numeric values'

dblAmount = CDbl(txtAmount.Text)

dblMonthlyRate = CDbl(txtRate.Text) / 100 'allows interest rate to be entered whole number'

dblMonths = CDbl(txtYears.Text)

'Format input values'

txtAmount.Text = FormatCurrency(dblAmount)

txtRate.Text = FormatPercent(dblMonthlyRate)

txtYears.Text = FormatNumber(dblMonths)

'Calculate payment'

dblMonthlyPayment = -Pmt(dblMonthlyRate / 12, dblMonths * 12, dblAmount)

'Format answer'

txtMonthlyPayment.Text = FormatCurrency(dblMonthlyPayment)

'Results for listbox should be new loan balance and interest rate'

'Result should be from Loan Amount minus result in Payment field'


'Dim dblLoanInterest As Double

'Dim i As Integer

'Dim NewLine As String

'dblLoanInterest = CDbl(lstLoanInterest.Text)

'dblLoanInterest = dblAmount - dblMonthlyPayment





End Sub


GeneralHTML to IMAGE Pin
woklet2-May-05 5:02
woklet2-May-05 5:02 
GeneralStream problems Pin
CrazyEd161-May-05 23:35
CrazyEd161-May-05 23:35 
GeneralRe: Stream problems Pin
GeneralDisorder2-May-05 0:37
GeneralDisorder2-May-05 0:37 
GeneralProb in transferring ASP.NET Web Application Pin
vishalmishra1-May-05 23:15
vishalmishra1-May-05 23:15 
GeneralRe: Prob in transferring ASP.NET Web Application Pin
Christian Graus2-May-05 14:01
protectorChristian Graus2-May-05 14:01 
GeneralRe: Prob in transferring ASP.NET Web Application Pin
vishalmishra3-May-05 4:26
vishalmishra3-May-05 4:26 
GeneralRe: Prob in transferring ASP.NET Web Application Pin
Christian Graus3-May-05 13:18
protectorChristian Graus3-May-05 13:18 
GeneralCrystal Reports Pin
Madni Abbasi1-May-05 20:43
Madni Abbasi1-May-05 20:43 
Questionhow to assign NULL to Date Field ? Pin
Madni Abbasi1-May-05 20:37
Madni Abbasi1-May-05 20:37 
AnswerRe: how to assign NULL to Date Field ? Pin
Madni Abbasi1-May-05 21:11
Madni Abbasi1-May-05 21:11 
GeneralPicture box binding problem Pin
Binary01101-May-05 20:33
Binary01101-May-05 20:33 
GeneralRe: Picture box binding problem Pin
Madni Abbasi1-May-05 20:55
Madni Abbasi1-May-05 20:55 
GeneralRe: Picture box binding problem Pin
Anonymous1-May-05 21:07
Anonymous1-May-05 21:07 
GeneralRe: Picture box binding problem Pin
Madni Abbasi1-May-05 21:27
Madni Abbasi1-May-05 21:27 
GeneralRe: Picture box binding problem Pin
Binary01101-May-05 21:39
Binary01101-May-05 21:39 
GeneralRe: Picture box binding problem Pin
Binary01102-May-05 7:26
Binary01102-May-05 7:26 
Questionhow to write to a few clients in a socket,please Pin
jpartley1-May-05 18:00
jpartley1-May-05 18:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.