{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

fm3_problems38

# fm3_problems38 - A 1 2 3 4 5 6 7 B C D E 1 2 3 4 5 6 7 VBA...

This preview shows pages 1–9. Sign up to view the full content.

A B C D 1 2 3 4 5 6 7

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
VBA Code Sub Ex1Macro() MsgBox "This is Line1" & Chr(10) & _ "This is Line2", vbAbortRetryIgnore + vbSystemModal, _ "This is the title" End Sub E 1 2 3 4 5 6 7
A B C D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
VBA Code Function BetterNewPV(CF, r, n) Dim i As Integer Dim Temp Temp = 0 For i = 1 To n Temp = Temp + CF / (1 + r) ^ i Next i BetterNewPV = Temp End Function Sub PVCalc() Dim CF, r, n CF = InputBox("Enter the cash flow:", "PV Calc", "100.00") r = InputBox("Enter the interest rate:", "PV Calc", "0.1") n = InputBox("Enter the number of periods:", "PV Calc", "5") MsgBox "PV is:" & BetterNewPV(CF, r, n), , "PV Calc" End Sub E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
A B C D 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
VBA Code Sub NewPVCalc() Dim CF, r, n CF = InputBox("Enter the cash flow:", _ "New PV Calc", "100.00") r = InputBox("Cash flow enterd:" & CF & Chr(13) & _ "Enter the interest rate:", _ "New PV Calc", "10.00%") If Right(r, 1) = "%" Then r = Val(Left(r, Len(r) - 1)) / 100# Else r = Val(r) End If n = InputBox("Cash flow entered:" & CF & Chr(13) & _ "Interest rate enterd:" & _ FormatPercent(r, 4) & Chr(13) & _ "Enter the number of periods:", _ "New PV Calc", "5") MsgBox "PV is:" & _ FormatCurrency(BetterNewPV(CF, r, n), 3), _ , "New PV Calc" End Sub E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
A B C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
VBA Code Sub PmtCalculator() Dim r, n, Sum, Pmt, Temp, i Sum = InputBox("Enter the sum of the loan", _ "Payment Schedule Calculator", "1000.00") n = InputBox("Sum is " & Sum & Chr(13) & _
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 18

fm3_problems38 - A 1 2 3 4 5 6 7 B C D E 1 2 3 4 5 6 7 VBA...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online