Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default FileCopy Error 52

Hi all,

i got a VBA question on the FileCopy Function:

I'm using FileCopy in an Excel VBA Macro to copy an old file to a new
file . Usually all works fine.
But one client uses a some Windows Server environment (sorry for being
so unspecific: I'm usually on unix environments) and there I get Error
52 'Source or Destination is invalid or not specified.'.

Below you can see the pseudo-code of the my code. I'm checking if
oldFile and neuesFile have been set and if they are set correctly. I
even printed oldFile and neuesFile out to check if they are set. They
are...

oldFile = Application.GetOpenFilename()
'here I check if oldFile is set
neuesFile = Application.GetSaveAsFilename(initialFilename:=old File)
'here I chekc if neuesFile is set correctly
FileCopy oldFile, neuesFile
'I tried too: FileCopy CStr(oldFile), CStr(neuesFile) 'same error

The documentation tells me that:
"
- If you try to use the FileCopy function on a currently open file, an
error occurs.

- FileCopy requires full trust to work on the local drive.
"
Supposing the second problem appears, does anybody know what full
trust means?
I'm almost sure that my Error 52 means, that there must be some
problem concerning the rights for the files this users tries to copy.
Since this problem occurs only for some clients and I'm definitively
sure that the arguments are set despite to the ArgumentException 52.

Has anybody any experience with this problem? Can you tell me, how the
rights must be set, that FileCopy works fine?
Or do you have other ideas why this error may occur?

thanks

simon

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FileCopy Command Giving "Subscript Out of Range" Error Message Jim Hagan Excel Programming 2 June 15th 05 06:07 PM
FileCopy Andibevan[_2_] Excel Programming 2 May 18th 05 02:58 PM
FileCopy Dana DeLouis[_5_] Excel Programming 0 August 11th 03 12:57 PM
FileCopy John Green[_2_] Excel Programming 1 August 5th 03 08:55 AM
FileCopy error Chip Pearson Excel Programming 0 August 1st 03 02:43 PM


All times are GMT +1. The time now is 01:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"