Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

Test if application is running within IDE


Public Function IsIDE() As Boolean
On Error Goto ExitHandler
Debug. Print 1 / 0   'doesn't compile, so doesn't execute in EXE
ExitHandler:
IsIDE = Err         '1/0 gives error only in IDE.  False = no error,  True = error
End Function