How to tell if in IDE

Posted on 2003-02-26
Medium Priority
Last Modified: 2010-05-01
Is there an easy way, via code, to tell if you are in the IDE as compared to a compiled app?

I want certain code to not run in the IDE but too run in the exe.

Question by:KOCUBA
LVL 28

Accepted Solution

vinnyd79 earned 150 total points
ID: 8026804

Expert Comment

ID: 8028195
Public Function DEBUG_MODE() As Boolean
On Local Error GoTo HandleError

    ' Error (only in ide mode) {
    Debug.Print 1 / 0
    DEBUG_MODE = False

Exit Function

    ' Ide {
    DEBUG_MODE = True

End Function

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question