Trying to write a function that calls another function and passes a Range parameter. The following code works
Function CallMxvSMA()
last = "E10"
bars = 2
CallMxvSMA = MxvSMA(Range(last), bars)
End Function
but it is not quite what I need, I need to formulate the range in a more complicated fashion something like:
last = "EMAlast.Offset(EMABars, 0)" 'where EMAlast is an Excel range.
I can't seem to pass anything complicated like that as a range parameter to the called function. Anybody got game?
Function CallMxvSMA()
last = "E10"
bars = 2
CallMxvSMA = MxvSMA(Range(last), bars)
End Function
but it is not quite what I need, I need to formulate the range in a more complicated fashion something like:
last = "EMAlast.Offset(EMABars, 0)" 'where EMAlast is an Excel range.
I can't seem to pass anything complicated like that as a range parameter to the called function. Anybody got game?