re: code crashes
You are calling the code when calculation occurs.
The code you call changes a cell value which appears to cause calculation, so the code is called again...
Try this...
'---
Application.EnableEvents = False
If Range("Index_Count").Value <> previousIndex Then
Call Initiate_Generator
previousIndex = Range("Index_Count").Value
End If
Application.EnableEvents = True
'---
Note: every exit point in the code needs to set EnableEvents to True.
That means, at least, you need error handling to set EnableEvents to true.
NLtL
https://1drv.ms/u/s!Au8Lyt79SOuhZ_2VvKCLZxz9iwI?e=vnEabM
Add_Table of Contents, Calculate Payments, Custom_Functions, Professional_Compare