>Proc WhoCalls
>Local i
>For i=1 To 32
> if prog()=Prog(i)
> exit
> Endif
>Endf
>retu iif(i>1,sys(16,i-4),"! command window")
>
>In the error routine you use something like this:
>
>_whocalled=whocalls()
>return to (_whocalled)
Thanks you and all who contributed to this solution. The code above was almost perfect. The only change to be made was to the RETURN TO clause in the last line. It gives a syntax error in Vfp 5.0 and should read RETURN TO _whocalled.
Other than that, the snippet gets the job done. Thanks again.
- Gino