View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] aidan.heritage@virgin.net is offline
external usenet poster
 
Posts: 244
Default FileSystemObject.copyfile

It looks OK, so it MIGHT be worth storing the strings in variables and
using those rather than getting the CopyFile to concatenate.

KR wrote:
I'm using the following:

FileSystemObject.CopyFile _
RnRPath & WorkingFiles & RnRTemplate, _
RnRPath & LanID & ".xls"

and getting a runtime 424 object required error.

RnRPath is a network path, e.g. "\\server\folder\"
WorkingFiles is just a subfolder, e.g. "subfolder\"
RnRTemplate is a filename, e.g. "MyFile.xls"
And LanID is the user's login ID string, e.g. "myname"

I've checked the string assignments for the above variables, and they point
to a file and directory that exists.... Is there something else I should be
checking, or is it likely to be something about the paths and filename that
I'm not seeing? I have network access to all of these areas and use these
files 'manually', just can't seem to get it working in code.

Thanks!
Keith