Forum Discussion

Emanuele_Burgio's avatar
Emanuele_Burgio
Copper Contributor
Oct 03, 2022

Files list in Application.FileDialog(msoFileDialogFolderPicker)

Hi everyone.

I'd like to show files in a folder when i choose that by  Application.FileDialog(msoFileDialogFolderPicker).

In this moment the Application.FileDialog(msoFileDialogFolderPicker) shows only folders to select but not the files. In another words I'd like to have a view like Application.FileDialog(msoFileDialogFilePicker) for select a folder by checking if it's the right directory.

Thankyou very much.

  • Emanuele_Burgio 

    There is no way to do that. As an alternative, you could display Application.FileDialog(msoFileDialogFilePicker) and instruct the user to select an arbitrary file in the folder they want. You can then extract the folder from .SelectedItems(1)

    Of course, this will only work with folders that contain at least one file, it won't let users select an empty folder.

Resources