An Application.DoEvents in the loop would make the app responsive, but without any way to end the loop, or any precautions, that calculation will crash after about 32 cycles when the integer overflows.