bit of a stupid question, but I couldn't find any answers to it.
Sadly, I made a very shameful error, where I created an endless loop by accident.
Private Sub Textbox1_Change() Do While Len(Trim(Textbox1.Text)) > 4 MsgBox "Please enter your birthyear in format of ####" Loop End Sub
As I wanted to enforce users to type only 4 digits, obviously not realising I made an infinite-loop given it's impossible to close the
MsgBoxas once you reach
>4characters, it keeps on creating new
MsgBoxes even after you QueryClose/OK the one that popped up.
Is there a way I could cancel it, without closing Excel altogether? Sadly, I can't even pause the code given the
MsgBox opened in modal form and I can't click any of the editor elements.