Link to home
Start Free TrialLog in
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.

ASKER CERTIFIED SOLUTION
Avatar of vinnyd79
vinnyd79

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of IrishPheremone
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