Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Permission Denied" when use .CopyFile in win2000 2

Status
Not open for further replies.

pchpak

Programmer
Dec 15, 2002
3
US
Hi, I get runtime error '70' - "Permission Denied" when I try to copy a file using .CopyFile in win2000 environment.
I'm logged in as Admin with all permissions and rights.

If anybody knows how to fix this, please help.

Thanks,
-Peter
 

Just a thought here you aren't trying to copy a file in VBA and its the file that you are in that is issuing the command.


from MSDN 0fc 2000 documentation

An attempt was made to write to a write-protected disk or to access a locked file. This error has the following causes and solutions:

You tried to open a write-protected file for sequential Output or Append.
Open the file for Input or change the write-protection attribute of the file.

You tried to open a file on a disk that is write-protected for sequential Output or Append.

Remove the write-protection device from the disk or open the file for Input.

You tried to write to a file that another process locked.
Wait to open the file until the other process releases it.

You attempted to access theregistry, but your user permissions don't include this type of registry access.
On 32-bit Microsoft Windows systems, a user must have the correct permissions for access to the system registry. Change your permissions or have them changed by the system administrator.

 
Peter,

Just in case you haven't fixed it yet, I got this error when omitting the final "\" from the end of either the copy from or copy to path.

Was that it?

-Patrick

Nine times out of ten, the simplest solution is the best one.
 
Well ptpaton,

I don't know if you helped pchpak but I have wasted an entire day playing with this exact problem, and your advice did the Trick!

Thank you Thanky Thank you.

Cheers
 
Yeah, I ran into that once before and spent half a day messing with it, too. Thanks for the reminder. What a pain in the...er...mind.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top