Cinema
09-27-2018, 04:54 AM
Hi,
I have a code that should select via Application.FileDialog(msoFileDialogFolderPicker) an Excel File. The files are on Sharepoint. Unfortunately I cannot get an Windows Explorer drive link since Sharepoint has restricted Explorer rights. My folder path (Z:\) that refers to Sharepoint, is generated via "create link" but opens actually an https site.
My code is:
Set foDialog = Application.FileDialog(msoFileDialogFilePicker)
With foDialog
.Title = "Select " + fsFilePathArt + "-File "
.AllowMultiSelect = False
.InitialFileName = "Z:\Input_Data" +"\"
.InitialView = msoFileDialogViewDetails
If .Show = -1 Then
fsFullFileName = .SelectedItems(1)
Else
fsFullFileName = ""
End If
End With
It opens a https site with listed Excel Files in Windows Explorer but does not take the filename after clicking ok.
The folder name is taken by the code
Set foDialog = Application.FileDialog(msoFileDialogFolderPicker)
With foDialog
.Title = "Select a Folder"
.Title = "Select " + fsFilePathArt + "-Folder " '
.AllowMultiSelect = False
.InitialFileName = "Z:\Input_Data" + "\"
If .Show = -1 Then
fsFilePath = .SelectedItems(1)
Else
fsFilePath = ""
End If
End With
So I have no problems to take the foldername but with the file
I have a code that should select via Application.FileDialog(msoFileDialogFolderPicker) an Excel File. The files are on Sharepoint. Unfortunately I cannot get an Windows Explorer drive link since Sharepoint has restricted Explorer rights. My folder path (Z:\) that refers to Sharepoint, is generated via "create link" but opens actually an https site.
My code is:
Set foDialog = Application.FileDialog(msoFileDialogFilePicker)
With foDialog
.Title = "Select " + fsFilePathArt + "-File "
.AllowMultiSelect = False
.InitialFileName = "Z:\Input_Data" +"\"
.InitialView = msoFileDialogViewDetails
If .Show = -1 Then
fsFullFileName = .SelectedItems(1)
Else
fsFullFileName = ""
End If
End With
It opens a https site with listed Excel Files in Windows Explorer but does not take the filename after clicking ok.
The folder name is taken by the code
Set foDialog = Application.FileDialog(msoFileDialogFolderPicker)
With foDialog
.Title = "Select a Folder"
.Title = "Select " + fsFilePathArt + "-Folder " '
.AllowMultiSelect = False
.InitialFileName = "Z:\Input_Data" + "\"
If .Show = -1 Then
fsFilePath = .SelectedItems(1)
Else
fsFilePath = ""
End If
End With
So I have no problems to take the foldername but with the file