And to think, I was about to reinvent the wheel on this one...
Visual basic (and VBA) has a large set of financial functions that you can use. In the VBA help search for \"Financial Keyword Summary\" and you will get this list of financial functions:
Calculate depreciation. DDB, SLN, SYD
Calculate future value. FV
Calculate interest rate. Rate
Calculate internal rate of return. IRR, MIRR
Calculate number of periods. NPer
Calculate payments. IPmt, Pmt, PPmt
Calculate present value. NPV, PV