In the Options dialog box make sure that Auto Syntax Check is NOT checked in the Code Settings section. This turns off the error messages while still coloring incorrectly syntaxed code red. Hit the OK button and you should be error message free from now on!
What are Compile Errors? Compile errors refer to a wider group of VBA errors, which include syntax errors. Compile errors also identify problems with your code when considered as a whole. The syntax of each individual line may be correct, but when put together, the lines of your code don't make sense.
Do the following in your VBA editor window (entitled "Microsoft Visual Basic for Applications"):
Click the menu "Tools" and then "Options".
In the Options' "Editor" tab, uncheck the "Auto Syntax Check" box. (See screenshot, below.)
This change does not make the editor stop compiling in the background and marking syntax errors in red (or whatever formatting is specified in the Options tab "Editor Format").
MS Office programs share this common VBA editor, so if you change an option while editing VBA for Excel then you've changed it for Outlook, Word, etc.
In the VBE, Tools - Options - Editor and uncheck Auto Syntax Check. It will turn bad code red, but won't give you the popup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With