Forum Discussion

GeorgieAnne's avatar
GeorgieAnne
Iron Contributor
Nov 23, 2025
Solved

Can I control what is displayed in a FileDialog

Hello Excelers, Hope you are all doing well.   Is there an option to limit the files displayed when you use something like:   With Application.FileDialog(msoFileDialogFilePciker)       .Initial...
  • GeorgieAnne's avatar
    GeorgieAnne
    Nov 27, 2025

    Hello MrCharlesJenkins​ 

    Thank you so much for your reply. I kinda had that but I wanted to check with the experts to verify.

    What I ended up doing is:

    A) Create a folder.

    B) Check for any workbooks that match the date range and if the workbook matches the date range Copy it to the newly created folder.

    C) Using Application.FileDialog(msoFileDialogFilePciker) I will display that newly created folder and the user now had all the workbooks that match.

     

    It seemed a bit of an overkill to have to go through all that, but I guess since there is no native way, we have to get creative.

     

    The only issue I have is that when I display the Application.FileDialog(msoFileDialogFilePciker) dialog with a predefined workbook name like when you use the .InitialFileName xxx the workbook name is selected and truncated like in the image attached:

    There is a whole lot of a file name before the Ver.

    Do you think I can use SendKeys to move the cursor to the left of the first character or is there a better way?

    Thanks for your reply and confirmation, and happy Holidays to you and yours!

     

    GiGi

Resources