Function computefuturevalue(ByVal PresentVal, ByVal interest, ByVal period)
computefuturevalue = FormatCurrency(PresentVal * (1 + interest / 100) ^ period)
End Function
Private Sub Compute_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Compute.Click
Dim FutureVal As Double
Dim PresentVal As Double
Dim interest As Integer
Dim period As Integer
PresentVal = PV.Text
interest = Rate.Text
period = years.Text
' FutureVal = FV(PresentVal, interest, period)
FutureVal = PresentVal * (1 + interest / 100) ^ period
MsgBox("The Future Value is " & FutureVal)
End Sub
End Class