none
FileDialog with filters RRS feed

  • Question

  • Is there any any to open the FileDialog from vba with the following filters?

    • show only pdf documents
    • show only files in C:\MYDIRECTORY
    • files modified between 10/17/2014 and 10/21/2014

    Thanks

    Thursday, May 7, 2015 1:23 PM

All replies

  • Yes on the first two, no on the third.

    How to do the first two: see the VBA help page on FileDialog.

    Btw #3 is not a limitation of FileDialog, I know of no way to do that if using standard Windows file/open dialog either. You will need to validate the chosen file after the dialog returns (maybe using FileDateTime).


    -Tom. Microsoft Access MVP

    Thursday, May 7, 2015 1:48 PM
  • Hi,

    >>Is there any any to open the FileDialog from vba with the following filters?

     I’m afraid there isn’t an access object or method could support to open the Application.FileDialog property to open the dialog form. This is the forum to discuss questions about Microsoft Access develop, and I will move this thread to VBA forum.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.

    Thank you for your understanding.

    Best Regards

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 8, 2015 2:14 AM
    Moderator
  • You should build form with Listview and import files satisfying assumptions.

    Take look on FSO control parameters or you can use FileDateTime() function


    Oskar Shon, Office System MVP - www.VBATools.pl
    if Helpful; Answer when a problem solved

    Friday, May 8, 2015 3:18 PM
    Answerer