Using Application.FileDialog(msoFileDialogPicker) to select a file to make an OLEDB connection in Excel VBA.
The full filename returned (dummied-up to protect the guilty) is: D:\MyUserName\Documents\SubFolder1\SubFolder2\SubFolder3\My Filename.csv
ConnectionString is:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\MyUserName\Documents\SubFolder1\SubFolder2\SubFolder3\My Filename.csv;Extended Properties='text;HDR=YES;FMT=Delimited';
Connection.Open ConnectionString fails, reporting the path is not valid. I can copy/paste the filename part of ConnectionString (less the file name) into the address bar of File Explorer and it successfully goes to the folder.
Putting the filename part of ConnectionString (including the filename) into the address bar opens the file.
Any thoughts/suggestions?