IMO, macro substitution should be used only in a few cases where there are no others ways to accomplish task, like executing dynamicaly build SQL statement. Otherwise name expression is preferable for a few reasons: more readable code, faster execution, works properly with embeded spaces in pathes and works with object properties. The name expression can be used anywhere foxpro expects name: file name, variable name, e.t.c, for example
lcFieldName = "Field1"
Replace (lcFieldName) With "SomeValue"
is equvivalent of
Replace Field1 With "SomeValue"
>Ok, this worked... why do I need the ( ) and when should I use them? I thought the & was what I needed
>
>
>>In cases like this you should use name expression - a variable enclosed in parentheses.
>>
COPY FILE (gOutFname) TO (this.txtOutFname.value)
>>ERASE (gOutFname)
>>or
>>DELETE FILE (gOutFname)
>>
>>
< SNIP >
--sb--