Calling a function from a subroutine loop
Here is a subroutine and function that I cannot work out or find help on.
I'm trying to call a function in a subrouting, and then have the function
calculated inside a loop for changing variable values. Any advice would be
appreciated. Dan
Public Function CR(Y, X, Z)
Y = X^Z
End Function
Sub CalcCR()
Call CR(Y, X, Z)
X = 2
Z = 3
alpha = 1
For i = 1 to 10
X = X + Y
Next i
End Sub
|