×

Turn Off Syntax/Compile Error Alerts in Visual Basic Editor

By Chris Newman •  Updated: 02/13/14 •  2 min read
Turn Off Syntax/Compile Error Alerts in Visual Basic Editor

Writing VBA Code Can’t Be This Annoying, Can It?

When I first started coding in the Visual Basic Editor (VBE) I would always get so annoyed with the message box alerts that would pop up every time I didn’t use proper code syntax.  This caused me to get distracted since every time I didn't type something in properly I would get an error alert and have to click the OK button (usually occurred every other minute).

Visual Basic Editor Compile Error Dialog

Being new to using the Visual Basic Editor, I thought this was just normal and I had to live with the annoying pop-ups.  After I got more comfortable with the editor I started playing around with the options and stumbled upon a setting that I am so thankful exists!  This setting allowed me to turn off the annoying syntax error message alerts and I have not seen one since!

Steps To Get Rid Of The Syntax Error Alerts

Step 1: In the Visual Basic Editor (shortcut: Alt + F11) open the Tools menu and select Options…

Remove VBE Error Alerts in Microsoft Excel Writing Macros

Step 2: In the Options dialog box, ensure the Auto Syntax Check checkbox is NOT checked in the Code Settings section.  This turns off the error messages while still coloring incorrect syntax code with red font.

Remove VBA Error Alerts Auto Syntax Check Excel VBA Macros

Hit the OK button and you should be error message free from now on! Woohoo!!

My Question To You!

So I'm curious, was I just naive or did it take you a long time to figure out how to rid your life of VBA Error Alerts? Leave a comment below and let me know how long it took you!


Keep Learning

Chris Newman

Chris Newman

Chris is a finance professional and Excel MVP recognized by Microsoft since 2016. With his expertise, he founded TheSpreadsheetGuru blog to help fellow Excel users, where he shares his vast creative solutions & expertise. In addition, he has developed over 7 widely-used Excel Add-ins that have been embraced by individuals and companies worldwide.