Firstly, your title and the description of the issue doesn't seem to match. So are you experiencing a runtime error or an infinite loop?
Secondly, for some unknown reason, it seems you have edited your code to look the way it is. However, it seems that your code is actually a Worksheet Change event. As such, when the macro you wrote changes something within the sheet "Range.Value" or "Range.ClearContents" it will trigger the Change event macro again. Causing the infinite loop. As far as I know, Excel has a built in safe-guard against these kinds of infinite loop, so I'm not sure why you are having it. In any case, to prevent it, you'd need to disable EnableEvents before your code makes any changes to the model. Example...
Bookmarks