Copy Method

  • Thread starter Thread starter Jim Pockmire
  • Start date Start date
J

Jim Pockmire

How do I use it - not sure what needs to be declared or how things are
defined? - need to copy a file from one folder to another

Object.Copy destination
 
Jim said:
How do I use it - not sure what needs to be declared or how things are
defined? - need to copy a file from one folder to another

Object.Copy destination


Forget that and use the FileCopy statement instead.
 
I need some help with the syntax, e.g. if I wanted to copy "C:\MyFile.txt"
to "C:\Temp\" what would the code be?
 
Jim said:
I need some help with the syntax, e.g. if I wanted to copy
"C:\MyFile.txt" to "C:\Temp\" what would the code be?

FileCopy "C:\MyFile.txt", "C:\Temp\MyFile.txt"

Functions like this *are* explained in the help file.
 
Everything I have seen requires the use of the "FileSystemObject" which also
requires a reference to the "Scripting" library.

Is there not an easier way as I will be deploying this app to users who will
be unfamiliar with the process.

Where is the DOS copy command when you need it?
 
Jim Pockmire said:
Everything I have seen requires the use of the "FileSystemObject"
which also requires a reference to the "Scripting" library.

Is there not an easier way as I will be deploying this app to users
who will be unfamiliar with the process.

Where is the DOS copy command when you need it?

The FileCopy statement is native to VBA and doesn't require a reference
to the Scripting library.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top