Thanks, Sergey - that will do the trick.
Irv.
>See
Re: Reference active window as object Thread #
999413 Message #
999505>>
>>How can I tell if I'm in an Edit window during design time? I want to insert code or run other commands but only in a code edit window.
>>