Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No Macros Wanted but How?
Message
From
27/09/2000 17:35:39
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00421633
Message ID:
00421799
Views:
17
>I have a little code that looks like this:
>
>cDestFile = "\\server\share\excelout.xls"
>copy to (eval(cDestFile)) type xl5  &&breaks
>copy to &cDestFile type xl5         &&works
>
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform