sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I'm trying to come up with a routine that allows a user to browse to a file and then copy it to the same path as the active workbook - this is what I have so far;
With the above though I keep getting an error 75, Path/File Access Error and it fails on this line;
I can manually copy it no problem, so what's the issue?
Code:
Dim SourceFile, DestinationFile
SourceFile = Application.GetOpenFilename(FileFilter:="PDF Files (*.pdf), *.pdf", Title:="Select exisiting File")
DestinationFile = ThisWorkbook.Path
FileCopy SourceFile, DestinationFile
With the above though I keep getting an error 75, Path/File Access Error and it fails on this line;
Code:
FileCopy SourceFile, DestinationFile
I can manually copy it no problem, so what's the issue?