View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Todd Huttenstine[_2_] Todd Huttenstine[_2_] is offline
external usenet poster
 
Posts: 237
Default Runtime error Permission Denied

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

Todd Huttenstine


-----Original Message-----
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
.