NEED: VBA Subroutine Pls, do not use Class
Exmp:
Sub FutureAccountValue()
Dim Deposit As Single
Dim AddContribution As Single
Dim Years As Single
Dim InterestRate As Single
.....
//
Sub
1) Write a subroutine that asks the user for:
The deposit Amount
The additional contribution (deposit) each year
The number of Years
The interest Rate (APR)
Then, display the future value of the user’s account each year for some number of years. Also show the growth from the original investment only. You can do this using a loop inside your message box.
Set your default deposit amount to $10,000 Set your default
annual contribution to $500 Set the default term to 5 years
Set your default interest rate to 2%
So, if I use the default values above, I should get the following values in my message box:
1st Year: $10,700.00 2nd Year: $11,414.00 3rd Year: $12,142.28 4th Year: $12,885.13 5th Year: $13,642.83
Hints:
Growth $700.00 Growth $1414.00 Growth $2142.28
Growth $2885.13 Growth $3642.83
You will need several input boxes
Inside the message box which outputs the answers, you will want to
output each future value and the growth from the original
investment only (the growth amount will include interest and annual
contributions).
You will want to use a loop to output the results
Chr(13) is the syntax for carriage return (new line)
Chr(9) is the syntax for tab (inserting a few spaces)
Public Sub FutureAccountValue()
Dim Deposit As Single
Dim AddContribution As Single
Dim Years As Single
Dim InterestRate As Single
Dim FValue As Single
Dim i As Integer
Dim res As String
Deposit = 10000#
AddContribution = 500#
Years = 5
InterestRate = 2#
res = "FUTURE VALUE FOR EACH YEAR" & vbCrLf
For i = 1 To Years
FValue = -FV(InterestRate / 100, i, AddContribution, Deposit,
0)
res = res & vbNewLine + vbTab & i & " Year :" &
vbTab & FValue
Next i
MsgBox res, , "Future Value"
End Sub
-------------------------------------
Private Sub btnExit_Click()
End
End Sub
-----------------------------------------
Private Sub btnFV_Click()
Call FutureAccountValue
End Sub
--------------------------------------------
OUTPUT:
Get Answers For Free
Most questions answered within 1 hours.