M
Matthijs de Z
Hi,
I want to just do a simple copy action using visual basic for application in
excel.
In a directory I have some file that need to be copied by time. Most of the
files have the extinction .dat (like file1.dat, file2.fat..etc...). And
there are two files with a different name and extinction. The rest of the
file are not to be copied.
For the file with a specific name, I wanted to use this sub code:
Sub copy_my_ files()
fileSystem.FileCopy("c:\tmp\file.txt","c:\backup\file.txt")
End Sub
But when I leave the row when the fileCopy code is on, I get the following
error:"Compile error: Expected: ="
How come??
When I did a first test I probably wrote it slightly different, because I
did manage to make a copy this way. But I bumped in to another problem
then, when I tried to use this
fileSystem.FileCopy("c:\tmp\*.dat","c:\backup\*.*")
But this doesn't work at all.... :-(
Can anybody help me with these problems?
Best regards,
Matthijs
I want to just do a simple copy action using visual basic for application in
excel.
In a directory I have some file that need to be copied by time. Most of the
files have the extinction .dat (like file1.dat, file2.fat..etc...). And
there are two files with a different name and extinction. The rest of the
file are not to be copied.
For the file with a specific name, I wanted to use this sub code:
Sub copy_my_ files()
fileSystem.FileCopy("c:\tmp\file.txt","c:\backup\file.txt")
End Sub
But when I leave the row when the fileCopy code is on, I get the following
error:"Compile error: Expected: ="
How come??
When I did a first test I probably wrote it slightly different, because I
did manage to make a copy this way. But I bumped in to another problem
then, when I tried to use this
fileSystem.FileCopy("c:\tmp\*.dat","c:\backup\*.*")
But this doesn't work at all.... :-(
Can anybody help me with these problems?
Best regards,
Matthijs