Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When editing Microsoft Office VBA, how can I disable the popup "Compile error" messages?

Tags:

editor

vba

People also ask

How do I stop Visual Basic error in Excel?

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 is VBA compile error?

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.

MS VBA editor's Tools Options dialog box


In the VBE, Tools - Options - Editor and uncheck Auto Syntax Check. It will turn bad code red, but won't give you the popup.