THis will give that output
If st = "ENTRY" Then
For i = 0 To 5
clean (i)
rec = rec("MessaGE")
MsgBox i 'Uncommented
Next i
Since ""MessaGE" <> "ENTRY" , In the first Recursive call that segment is ignored and the ELSE part comes into play
Else
rec = repl(st)
End If
IN all subseguent Recursives, the return from repl also <> "ENTRY"
When a Function is called, that Function is placed in RAM and stays there only as long as it is executing, At the end of the loop in the First rec, you have called six rec's, but they are running in parallel, not recursively, sort of, broadly speaking.
Note that in your code, only the original is recursing because all the rest are in the "Else" mode of the If...Then... Else.
Function Recur(X as Double, I as Integer) As Double
'Must have a way to stop the Recurrence.
If I = 5 then Exit Function 'Try commenting this line out
If X < 90 Then exit Function 'About a dozen Recurrences
I = I + 1
Recur = X * 0.99
MsgBox Chr(191 + I) & ": " & Recur
Recur = Recur(Recur, I)
End Function
Sub Test_Recur()
Dim Y
Y = Recur(100, 1)
MsgBox "The Final Result is " & Y
End Sub