Financial クラス
アセンブリ: Microsoft.VisualBasic (microsoft.visualbasic.dll 内)
構文
解説
詳細については、Visual Basic のトピック「Financial モジュール (Visual Basic)」を参照してください。
このモジュールは、減価償却費、現在価値および将来価値、利率、利益率、支払いなどの財務計算を実行する Visual Basic ランタイム ライブラリ メンバをサポートします。
この例では、Rate 関数を使用してローンの利率を計算します。支払い回数 (TotPmts)、支払い額 (Payment)、現在価値または元金 (PVal)、将来価値 (FVal)、支払い期日 (PayType)、利率の推定値 (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
Microsoft.VisualBasic.Financial
プラットフォーム
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- Financial クラスのページへのリンク