Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FileCopy Command Giving "Subscript Out of Range" Error Message | Excel Programming | |||
FileCopy | Excel Programming | |||
FileCopy | Excel Programming | |||
FileCopy | Excel Programming | |||
FileCopy error | Excel Programming |