The Financial module contains procedures used to perform financial operations.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
Thetype exposes the following members.
|DDB||Returns a Double specifying the depreciation of an asset for a specific time period using the double-declining balance method or some other method you specify.|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|FV||Returns a Double specifying the future value of an annuity based on periodic, fixed payments and a fixed interest rate.|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|IPmt||Returns a Double specifying the interest payment for a given period of an annuity based on periodic, fixed payments and a fixed interest rate.|
|IRR||Returns a Double specifying the internal rate of return for a series of periodic cash flows (payments and receipts).|
|MIRR||Returns a Double specifying the modified internal rate of return for a series of periodic cash flows (payments and receipts).|
|NPer||Returns a Double specifying the number of periods for an annuity based on periodic fixed payments and a fixed interest rate.|
|NPV||Returns a Double specifying the net present value of an investment based on a series of periodic cash flows (payments and receipts) and a discount rate.|
|Pmt||Returns a Double specifying the payment for an annuity based on periodic, fixed payments and a fixed interest rate.|
|PPmt||Returns a Double specifying the principal payment for a given period of an annuity based on periodic fixed payments and a fixed interest rate.|
|PV||Returns a Double specifying the present value of an annuity based on periodic, fixed payments to be paid in the future and a fixed interest rate.|
|Rate||Returns a Double specifying the interest rate per period for an annuity.|
|SLN||Returns a Double specifying the straight-line depreciation of an asset for a single period.|
|SYD||Returns a Double specifying the sum-of-years digits depreciation of an asset for a specified period.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
This example uses the Rate function to calculate the interest rate of a loan, given the total number of payments (TotPmts), the amount of the loan payment (Payment), the present value or principal of the loan (PVal), the future value of the loan (FVal), a number that indicates whether the payment is due at the beginning or end of the payment period (PayType), and an approximation of the expected interest rate (Guess).
Sub TestRate() Dim PVal, Payment, TotPmts, APR As Double Dim PayType As DueDate ' Define percentage format. Dim Fmt As String = "##0.00" Dim Response As MsgBoxResult ' Usually 0 for a loan. Dim FVal As Double = 0 ' Guess of 10 percent. Dim Guess As Double = 0.1 PVal = CDbl(InputBox("How much did you borrow?")) Payment = CDbl(InputBox("What's your monthly payment?")) TotPmts = CDbl(InputBox("How many monthly payments do you have to make?")) Response = MsgBox("Do you make payments at the end of the month?", MsgBoxStyle.YesNo) If Response = MsgBoxResult.No Then PayType = DueDate.BegOfPeriod Else PayType = DueDate.EndOfPeriod End If APR = (Rate(TotPmts, -Payment, PVal, FVal, PayType, Guess) * 12) * 100 MsgBox("Your interest rate is " & Format(CInt(APR), Fmt) & " percent.") End Sub
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.