>I have a little code that looks like this:
>
>cDestFile = "\\server\share\excelout.xls"
>copy to (eval(cDestFile)) type xl5
>copy to &cDestFile type xl5
>
>What's the best way to do that without having to do macro sub?
>
>Thanks.
As others have said, use a named expression
copy to (cDestFile) type xl5
Just wanted to add that this is the best way especially when directory are file names are involved, as the macro expansion will not work if the directory or file has spaces in the name.
Insanity: Doing the same thing over and over and expecting different results.