Aca encontre 1 código. Pero =mente no es el que buscaba, pero ayuda.
Module1:
Option Explicit
Public RunningInIDE As Boolean
Sub Main()
Debug.Assert CheckIDE 'This will not be called if is a exe
Form1.Show
End Sub
Public Function CheckIDE()
RunningInIDE = True
End Function
Form:
Option Explicit
Private Sub Command1_Click()
MsgBox RunningInIDE
End Sub