>Does anyone know how you can tell if you are running in the VB IDE vs. Compiled code?
>
>I am not using a usercontrol, so ambient won't work. I've checked the
>VBIDE.VBE object but I'm not sure I can use that.
>
>Thanks!
One way that I have heard of and used at some point or another, is to try to print something to the debug window and then trap the error. If no error occured, then the debug window was succesfully written to. And since the debug window is only available within the IDE, an error would most probably result in the code being unable to access it, thus being compiled. To make sure, you can trap the correct error code that tells you when the object cannot be found.
Hugo Dahl
"My get up and go must've got up and went"
-Steve Tyler, Aerosmith