NauticalGent
Ignore List Poster Boy
- Local time
- Today, 03:27
- Joined
- Apr 27, 2015
- Messages
- 6,657
Good morning everyone, I'm having an issue with the msoFileDialogFilePicker that I have not seen anyone ask about...
It works as advertised but when I try to copy the file form its original location to another location, I got runtime error 70 - Permission denied. While reading up on the msoFileDialog family, there was a footnote about if the file is open, the Permission Denied error is what you get.
I am using the FileCopy method to attempt this and I have tried setting the FileDialog object to nothing before the FileCopy and I have even tried passing the SelectedItems(1) (strFilePath = .SelectedItems(1)) to another Sub in hopes that it would somehow "let go"...nothing has worked.
Is there something I am missing or is the nature of the beast? If so, what is the work-around?
It works as advertised but when I try to copy the file form its original location to another location, I got runtime error 70 - Permission denied. While reading up on the msoFileDialog family, there was a footnote about if the file is open, the Permission Denied error is what you get.
I am using the FileCopy method to attempt this and I have tried setting the FileDialog object to nothing before the FileCopy and I have even tried passing the SelectedItems(1) (strFilePath = .SelectedItems(1)) to another Sub in hopes that it would somehow "let go"...nothing has worked.
Is there something I am missing or is the nature of the beast? If so, what is the work-around?