本文介绍了如何计算Financial.PMT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何计算多年来以一定利率投资的资金总额?
How do I calculate a sum of money invested at a certain interest rate for a number of years?
推荐答案尝试以下方法: msdn.microsoft/zh-cn/library/microsoft.visualbasic.financial.pmt%28v = vs.80%29.aspx [ ^ ] Try this: msdn.microsoft/en-us/library/microsoft.visualbasic.financial.pmt%28v=vs.80%29.aspx[^] Sub TestPMT() Dim PVal, APR, Payment, TotPmts As Double Dim PayType As DueDate Dim Response As MsgBoxResult ' Define money format. Dim Fmt As String = "###,###,##0.00" ' Usually 0 for a loan. Dim FVal As Double = 0 PVal = CDbl(InputBox("How much do you want to borrow?")) APR = CDbl(InputBox("What is the annual percentage rate of your loan?")) If APR > 1 Then APR = APR / 100 ' Ensure proper form. TotPmts = CDbl(InputBox("How many monthly payments will you make?")) Response = MsgBox("Do you make payments at the end of month?", MsgBoxStyle.YesNo) If Response = MsgBoxResult.No Then PayType = DueDate.BegOfPeriod Else PayType = DueDate.EndOfPeriod End If Payment = Pmt(APR / 12, TotPmts, -PVal, FVal, PayType) MsgBox("Your payment will be " & Format(Payment, Fmt) & " per month.") End Sub
并在这里看看: msdn.microsoft/en-us/library/hyd90ysd%28v = vs.71%29.aspx [ ^ ]
and take a look here: msdn.microsoft/en-us/library/hyd90ysd%28v=vs.71%29.aspx[^]
更多推荐
如何计算Financial.PMT
发布评论