View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default object.CopyFile() has an error?

"GS" wrote:

Since you're using FSO.CopyFile instead of VBA's CopyFile, the
Script56.chm states...

"Note that CopyFile will fail if *destination* has the read-only
attribute set, regardless of the value of overwrite."


I found that the C:\data folder has the Read Only attribute set.
I tried removing it but it won't go away. If the folder is Read
Only,
why does the code write the file into the folder once, but on the
second time it fails?

BTW, I'm running this code on a personal laptop.


Changing the attribute via the Properties dialog does nothing if
Permissions do not allow 'write'!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion