Runtime error Permission Denied

T

Todd Huttenstine

Below is my code. It works on my computer but when I
tried it on another computer I get the error "Runtime
error 70. Permission Denied." and it highlights the last
code (FileCopy FileFrom, FileTo). The code is below.

Dim FileFrom As String
Dim FileTo As String

FileFrom = Worksheets(1).Range("G4").Value
FileTo = Worksheets(1).Range("G5").Value
FileCopy FileFrom, FileTo

The file paths are correct but it wont bperform the copy
to instruction. I tried to mannualy copy and paste and it
works, so why can it not programmatically do it?

Thank you

Todd Huttenstine
 
T

Todd Huttenstine

Nevermind, I got it to work. I just restarted Excel and
it solved the problem.

Todd Huttenstine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top