In this Excel Vba Tips and tricks tutorial, I'll be teaching you how to stop the execution of excel vba code entirely. For this I'll be using the VBA End Statement.
Link to article : https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/end-statement