Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,560 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,920 people online right now. Registration is fast and FREE... Join Now!




Amortization schedule in textbox

 
Reply to this topicStart new topic

Amortization schedule in textbox

sooperman
4 Apr, 2008 - 04:36 PM
Post #1

New D.I.C Head
*

Joined: 4 Apr, 2008
Posts: 6

I am having trouble with starting an if statement to make an amortization schedule show up in a textbox. I have the amount, and interest, and payment and stuff. Now I just need to create an amortization schedule and display it in a text box.
Here is a picture and then the code to help you guys help me.
IPB Image
CODE
   Private Sub btncalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncalculate.Click
        Dim dblamountofloan As Double
        Dim dblrate As Double
        Dim intmonths As Integer
        Dim dblpayamount As Double
        Dim line As String


        
        dblamountofloan = Convert.ToDouble(txtamount.Text)
        dblrate = Convert.ToDouble(txtintrate.Text)
        intmonths = Convert.ToInt32(txtmonths.Text)

        dblpayamount = (dblamountofloan * (dblrate / 12)) / (1 - 1 / (1 + dblrate / 12) ^ intmonths)
        txtpayment.Text = dblpayamount.ToString("C")



        If intmonths <= 12 Then
            txtline.text = line & "Month" & vbTab & "Payment" & vbTab & "Interest" & vbTab & (txtline.text)

        End If

    

    End Sub

    Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear.Click
        txtamount.Clear()
        txtintrate.Clear()
        txtmonths.Clear()
        txtpayment.Clear()
        txttable.Clear()


This post has been edited by sooperman: 4 Apr, 2008 - 04:39 PM
User is offlineProfile CardPM
+Quote Post

sooperman
RE: Amortization Schedule In Textbox
5 Apr, 2008 - 09:29 AM
Post #2

New D.I.C Head
*

Joined: 4 Apr, 2008
Posts: 6

Bump...
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 11:33PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month