FolderPicker
Allows the user to select a folder.
Dim objFileDialog As Office.FileDialog
Set objFileDialog = Application.FileDialog(MsoFileDialogType.msoFileDialogFolderPicker)
With objFileDialog
.AllowMultiSelect = True
.ButtonName = "Folder Picker"
.Title = "Folder Picker"
If (.Show > 0) Then
End If
If (.SelectedItems.Count > 0) Then
Call MsgBox(.SelectedItems(1))
End If
End With
Select Folder
Dim f As Object 'FileDialog
Set f = Application.FileDialog(4) 'msoFileDialogFolderPicker
With f
.InitialFileName = "C:\Temp\"
.Show
If .Show = True Then 'item select, not cancel
MsgBox Trim(.SelectedItems(1))
End If
End With
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext