XLA routines: EE_CopyToTempIfDifferent
EE_CopyToTempIfDifferent copies a file to the temp dir if it has changed
- useful if you are opening the same file from a directory multiple times
Function EE_CopyToTempIfDifferent(strFullFilePath As String) As Boolean 'Takes a full file name and path 'Copies it to temp dir (deleting existing file if it exists) Returns false if unsuccessful 'http://excelexperts.com/xla-routines-eeCopyToTempIfDifferent for updates on this function On Error Resume Next Kill Environ("Temp") & Application.PathSeparator & EE_FileNameFromFilePath(strFullFilePath) Call EE_CopyFile(strFullFilePath, Environ("Temp")) EE_CopyToTempIfDifferent = (Err.Number = 0) Err.Clear: On Error GoTo 0: On Error GoTo -1 End Function
»
- Nick's blog
- Login or register to post comments
- 4874 reads
Recent comments
5 years 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago