几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】need to copy a file but get 9expected procedure, not variable.0 with help code (http://www.dimcax.com/hust/showthread.php?t=5565)

yang686526 2009-04-13 01:03 PM

【转帖】need to copy a file but get 9expected procedure, not variable.0 with help code
 
need to copy a file but get (expected procedure, not variable.) with help code?
from help i got this:
dim sourcefile, destinationfile
sourcefile = "srcfile" ' define source file name.
destinationfile = "destfile" ' define target file name.
filecopy sourcefile, destinationfile ' copy source to target.
i made this:
dim sourcefile, destinationfile
sourcefile = "s:\pdf print files\dlee\" & fname1 & " - dwg.pdf" ' define source file name.
destinationfile = "s:\temp\ipdp_files\" ' define target file name.
filecopy sourcefile, destinationfile ' copy source to target
but when i run it i get:
expected procedure, not variable.
can anyone help?
you will have named your module code name filecopy, so the function within it gets confused. renamed the module filename to filecopy1


所有的时间均为北京时间。 现在的时间是 04:16 PM.