Nadya,
I didn't see Vlad's answer until I'd sent mine - they overlapped, I know. Is this a compiled program? Are you using MODIFY COMMAND or and edit box to edit the code?
>Barbara,
>
> Paul Vlad suggested to use RANGE clause in MODIFY COMMAND. I tried, the result is similar to the procedure, you described. Perhaps, it's the better I can do here. I'm not completely satisfied, however, because Function MyFunction doesn't appear on the top of the window, even if the cursor seats on the Function.