Steve,
Sorry for the error. As JimB pointed out DO WITH already sends parameters by reference. You can't alter a constant though like you originally posted you have to pass a memvar. The @ works if you call the code with a function call style:
=ShortMenu( "A", "B", @lnValue )
The = isn't needed if you are VFP5 or 6.
> Thanks for the tips you sent me. But when I modified the code by including the '@' Visual Foxpro 5 return a syntax error. If I remove the '@' then it is able to compile. Do you know why?
>
>>lnValue = 1
>>do shortmenu with "A", "B", @lnValue
>>? lnValue