Perhaps file is opened, then try to use API function:
Private Declare Function apiCopyFile Lib "kernel32" _
Alias "CopyFileA" _
(ByVal lpExistingFileName As String, _
ByVal lpNewFileName As String, _
ByVal bFailIfExists As Long) _
As Long
call apiCopyFile(strSource, strTarget, boolFailIfExists)
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
"Michael" <(E-Mail Removed)> wrote in message
news:1DDFF314-A83B-4D66-846F-(E-Mail Removed)...
> Hello,
>
> I tried to use the FileCopy Statement to copy a file located in a read
> only
> folder to an other folder that has no restriction. But it did not work and
> I
> get an error message . Is there a way to do it in VB?
> (It is for a MS Access 2000 Application)
>
> Doing it manualy: Copy of files from the read only folder and paste to a
> folder that has no restriction works in Windows Explorer. But I'm looking
> to
> do it in VB from a command button...
>
> Thanks,