如何计算Financial.PMT

编程入门 行业动态 更新时间:2024-10-24 22:20:15
本文介绍了如何计算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

本文发布于:2023-11-09 15:36:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572749.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Financial   PMT

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!