Silencing the VBE

November 16, 2009 by datapig Leave a reply »

Here’s a quick post that will help you silence the VBE while writing code.

 

Often times, you’ll be working some code and during the process, you need to go to another like to copy something. The line you’re on isn’t complete – you just need to leave it for a second. The VBE immediately reacts with a message box warning you that you’re an idiot. Like this:

SuprressVBEerror

  

This when you scream at your screen “I know, I know!”  As you can imagine, this can get rather annoying after few rounds with VBA.

You can suppress these messages by turning off Auto Syntax Check.

 

Go up to the VBE menu and select Tools -> Options. The options dialog box activates to expose the Auto Syntax Check option under the Editor tab. Simply uncheck the property.

SuprressVBEerror2

 

 

After that, the VBE will keep quiet. The neat thing is that your code still turns red if you goof up, providing a visual indication that something is wrong.

RELATED STUFF

  1. Mocking the ‘Merge & Center’ Icon
  2. VBE Tips I Wish I Knew 5 Years Ago
  3. Highlighting the Active Row and Column
  4. ActiveX Controls and Intellisense
  5. Sending Data to Excel using Access SQL
  6. Why is Excel so Negative about Hiding Subtotals
  7. Why Replace the DOM Interface
  8. Running an Access Parameter Query from Excel
  9. Documenting Access Queries in Excel
  10. Are GOTO Statements Still Dirty?
Advertisement

8 Responses

  1. MnM says:

    I think you forgot to proof read. I’m usually guilty of that too.

    Reread the first sentence and the last paragraph.

    ;o)

  2. datapig says:

    MnM: Thanks for the heads up. Fixed it.

  3. JP says:

    Another great tip I learned from Bob Umlas and Jon Peltier at this year’s Excel User Conference.

  4. Rick Rothstein (MVP - Excel) says:

    And while you are at that Options/Editor dialog, you should give serious consideration to putting a check mark next to the “Require Variable Declaration” item. Doing this will save you from near variable name mispellings such as Counter0ne instead of CounterOne, MyVa1ue instead of MyValue, etc. (these are a little easier to see here in this blog’s font than they are in the VB Editor’s default font) as well as dropped letter mispellings such as FulLetterCode instead of FullLetterCode, and so.

  5. Daniel says:

    Great! Thank you so much. This one has been bugging me for a long, long time. I especially “loved” it when I would accidentally activate the “Help” button…

  6. Jon Peltier says:

    Rick -

    “Serious consideration?” No thought required, do it or else.

    Microsoft’s great at picking dumb defaults. Require Variable Declaration – Off. Hide Extensions of Known File Types – On. Yikes.

  7. datapig says:

    Rick: Great Tip. Like Jon says, No thought required, do it today.

  8. gary says:

    do that every time i reinstall

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>