VBA Recursion

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

A function that calls itself is said to be recursive. Recursive logic can often be implemented as a loop, too. Recursion must be controlled with a parameter, so that the function knows when to stop recursing and deepening the call stack. Infinite recursion eventually causes a run-time error '28': "Out of stack space".

See Recursion.

Remarks

Recursion allows for repeated, self-referencing calls of a procedure.



Got any VBA Question?