Returns True if the VB project is run
from within the VB development environment.
And False if it's run as an executable.
- Syntax
-
If IsVBIDE() Then ...
Source
Function IsVBIDE() As Boolean
Static stBeenHere As Boolean
Static stResult As Boolean
If stBeenHere Then
IsVBIDE = stResult
Else
stBeenHere = True
On Error GoTo Trap
Debug.Print 1 / 0
End If
Exit Function
Trap:
stResult = True
IsVBIDE = True
Exit Function
End Function
|