Hi, again...now another question
I would like to write a function:
Public Function NetPV(CashFlows As Range, drate As Double, period As Integer) As Variant
All I need is the ability to change the contents of the Range array, CashFlows depending on the
period. Is it possible to do so?
For example if CashFlows has 7 cell references in it and I just need the first 2:
CashFlows = (CashFlows(1), CashFlows(2))
I know this doesn't work as the compiler has a fit.
Any ideas?
Thank you all so much,
Rick
jaf - 06 Apr 2004 22:26 GMT
Hi Rick,
One way.
Public Function NetPV( drate As Double, period As Integer) As Variant
Dim CashFlows as range
Set CashFlows = Selected 'cells selected with mouse
Debug.print CashFlows.Address, CashFlows.rows.count,
CashFlows.rows(2).address, CashFlows.rows(2).value

Signature
John
johnf 202 at hotmail dot com
| Hi, again...now another question
|
[quoted text clipped - 14 lines]
|
| Rick