You should call it as a function.
See also
http://www.berezniker.com/content/pages/visual-foxpro/difference-between-function-and-procedure-statementsAlso you can not call thisform.Refresh() inside the function/procedure.
>More than ten year ago was dealing with procedures
>Now I have only I file called funcion.prg where
>I have some funcions inside it, not procedures
>
>And I have set proce to function.prg in my main.prg
>
>Today I need a program that will be called from several forms
>So I decide to put in my funcion.prg
>
>as below
>
>*************************
>
>proce SuM_ESTOQUES
>
> replace estoque_tt WITH estoque + estoque_vd
>
> thisform.Refresh
>
>************************************
>
>When I command: do sum_estoques, I have the message
>
>sum_estoques.prg does not exist
>
>What can be wrong ?
>
>
>Moises
If it's not broken, fix it until it is.
My Blog