A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Remove the trailing backslash.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Dear All,
with this code I'm able to open the below FileDialogFolderPicker which allows to access the files of my computer:
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = sInitialFolder
If .Show = -1 Then
lstCodeFile.Clear
sFolder = .SelectedItems(1)
txtCodeFileDirectory = sFolder
Else
Exit Sub
End If
End With
Any way to automatically fill the "Folder name" box with the value of the InitialFolder? (should be "Code")
Thanks
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Remove the trailing backslash.
If the InitialFileName is "D:\MyPC\05 - Tool*Code*" the Folder name" box should be "Code" and not empty
Make a new file
Run the code below
Where is the issue?
Andreas.
Sub Test()
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = "qwe"
.Show
End With
End Sub