Error 28, “Out of stack space”, means VBA filled the call stack, the memory that tracks who called whom. In practice it is recursion that never bottoms out: a function that calls itself with unchanged arguments, or a pair of event procedures (a Change handler that changes the cell, which fires Change again) chasing each other until the stack gives out. It is a logic bug, and the data usually has nothing to do with it.
Worksheet_Change handler that writes to the sheet re-fires itself. Disable events around your own writes:Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False ' stop my own writes re-firing Change
Target.Offset(0, 1).Value = Target.Value * 2
Application.EnableEvents = True
End Sub
Property Let or Get that refers to itself by name instead of its backing variable recurses on every access and is a classic hidden cause.If no self-calls are visible, suspect mutual recursion through the host: your handler calls a built-in command, the command fires another event, that event calls your handler. The call stack window (Ctrl+L in the editor) shows the repeating pattern of procedure names when you break in.
Why does the application freeze before error 28 appears? The loop runs at full speed consuming stack; the error can only be raised when the stack is completely exhausted, which can take a noticeable number of repetitions, all of which look like a hang.
Is error 28 caused by large data? Rarely directly. Large structures deepen legitimate recursion, but a stack overflow almost always means calls are repeating without progress, not that the data is big.