If you ever need to know whether your code running inside the IDE or is compiled, drop these two functions in a module and use the first one to figure it out:
Public Function RunTimeMode() As Boolean
Dim bool As Boolean
Debug.Assert SetToTrue(bool)
RunTimeMode = Not bool
End Function
Private Function SetToTrue(ByRef bool As Boolean) As Boolean
bool = True
SetToTrue = True
End Function