Welcome to Dream.In.Code
Become a VB Expert!

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




Loop Increments

 
Reply to this topicStart new topic

Loop Increments

shortytsg
9 Feb, 2007 - 07:13 AM
Post #1

New D.I.C Head
*

Joined: 9 Feb, 2007
Posts: 1


My Contributions
I'm trying to create an application that's paying 10% interest, compounded annually, and paid on the last day of the year. The syntax I'm using is Financial.FV(rate, NPer, Pmt[, PV, Due]). "FV" stands for "Future Value". This application should calculate and display the value of the savings account at the end of 5 years, 10 years, 15 years, 20 years, 25 years, and 30 years.
My question is:
What should be my "rate", "NPer", "Pmt"and "PV"? And Also,
how can I list only the years in the list box to show 5,10,etc?

This is what I have so far.....
CODE

If isConverted Then
            ' calculates and display value of account
            Term = Convert.ToDecimal(termListBox.SelectedItem)
            For rate As Decimal = 0.1D To 0.1D
                valueofaccount = _
                    Convert.ToDecimal(-Financial.FV(0.1, Term * 12, 0, DueDate.EndOfPeriod))
                valuLabel.Text = valuLabel.Text _
                    & rate.ToString("P0") & " -> " & amount.ToString("c2") _
                    & ControlChars.NewLine
            Next rate
**************************************
Private Sub MainForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ' fills the termListBox with terms 5, 10, 15, 20, 25, and 30 years

        For term As Integer = 5 To 30
            termListBox.Items.Add(term.ToString)
        Next term
    End Sub

User is offlineProfile CardPM
+Quote Post

Amadeus
RE: Loop Increments
10 Feb, 2007 - 08:45 PM
Post #2

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 12,230



Thanked: 40 times
Dream Kudos: 25
My Contributions
CODE

dim term as Integer
For term = 5 to 30 step 5


User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/4/08 03:22PM

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