Search
Left Quote    By failing to prepare, you are preparing to fail.
- Benjamin Franklin    
Right Quote
 
[login] | [Register]
Forum Index » Visual Basic » Viewing Topic and Replies
Post Reply


        Viewing Topic: future value funds??
  This user is offline  Vbuser
  Subject: "future value funds??" Posted: @ 8:27 am on Oct 23 2007   
Member #: 445
Rank: User - (2)
Since: 10/23/07
Posts: 2

hi there,

i really need your help :| i am trying to Write a program in which the user enters the Present Value of funds, the Annual Interest Rate (as a decimal), Today


    Viewed: 6,902 Times | Reply to This | To top
  This user is offline  Vbuser
  Subject: "re: future value funds??" Posted: @ 9:08 am on Oct 23 2007    
Member #: 445
Rank: User - (2)
Since: 10/23/07
Posts: 2

ok .. here is my try .. but somthing wrong with how can i fix it please ??



Code:

Public Class future_value



Private Sub ComputeBut_Clic k(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles ComputeBut.Clic k
Dim presentvaluedat e, futurevaluedate As Date
presentvaluedat e = Date.Parse(toda yPickerdate.Tex t)
futurevaluedate = Date.Parse(futu rePickerdate.Te xt)
Dim days As Integer = computedays(pre sentvaluedate, futurevaluedate )
computeTxt.Text = days & " days "

End Sub
Private Function computedays(ByV al todaydate As Date, ByVal futuredate As Date) As Integer
Dim numberofdays As TimeSpan = futuredate.Subt ract(todaydate)
Dim days As Integer = numberofdays.To talDays
computedays = days
End Function


Private Sub FutureValueBut_ Click(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles FutureValueBut. Click
Dim persentvalue As Single = Persentvaluetxt .Text
Dim rate As Single = InterestRatetxt .Text


Dim futurevalue As Single = futurevaluefund s(persentvalue, rate)

futurevalueTxt. Text = futurevalue


End Sub
Private Function futurevaluefund s(ByVal presentvalue As Single, ByVal interestrate As Single) As Single

futurevaluefund s = presentvalue * (1 + interestrate / 365) ^ days


End Function


End Class




    Viewed: 6,895 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank