?
Solved

How to tell if in IDE

Posted on 2003-02-26
2
Medium Priority
?
144 Views
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.

0
Comment
Question by:KOCUBA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 150 total points
ID: 8026804
0
 
LVL 2

Expert Comment

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

    ' Ide {
    DEBUG_MODE = True
    '}

End Function
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

764 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