Avatar of KOCUBA
KOCUBA
 asked on

How to tell if in IDE

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.

Visual Basic Classic

Avatar of undefined
Last Comment
IrishPheremone

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
vinnyd79

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
IrishPheremone

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
HandleError:

    ' Ide {
    DEBUG_MODE = True
    '}

End Function
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck