File systems

N

nath

Hi

I have code in order to look at all the files within a
given path. I would like to know how to copy and paste
files, i.e. make a copy of a file. From excel using VBA

TIA


Nathan.
 
J

Jim Rech

Check out the FileCopy statement in VBA help.

--
Jim Rech
Excel MVP
| Hi
|
| I have code in order to look at all the files within a
| given path. I would like to know how to copy and paste
| files, i.e. make a copy of a file. From excel using VBA
|
| TIA
|
|
| Nathan.
 
B

Bob Phillips

Hi Nathan,

Trythis

Dim FSO As Object
Dim oFile As Object
Set FSO = CreateObject("Scripting.FileSystemObject")
Set oFile = FSO.GetFile("c:\myTest\volker1.xls")
oFile.Copy ("c:\myTest\Copy of Volker1.xls")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top