+ Reply to Thread
Results 1 to 4 of 4

VBA file dialog:- show files without a certain string in filename

  1. #1
    Registered User
    Join Date
    05-13-2010
    Location
    Kozhikode, Keral, India
    MS-Off Ver
    Microsoft Office home and student 2019
    Posts
    49

    VBA file dialog:- show files without a certain string in filename

    Friends,
    I have the following code which enable me to select xml files from a certain folder.
    Now I want the filedialog to show only those files which do not contain the word 'updated'.
    This would help me to select only those files which are not processed, thereby reducing confusion

    Please Login or Register  to view this content.
    Best Regards
    Chandrajit

  2. #2
    Forum Contributor Dante Amor's Avatar
    Join Date
    07-24-2020
    Location
    MEXICO
    MS-Off Ver
    Excel 2013
    Posts
    212

    Re: VBA file dialog:- show files without a certain string in filename

    You could create a userform.

    Example:
    userform1.jpg

    When starting the userform filter the names and display in a listbox.
    Select the file and press a button.

    Put the following code inside the userform:

    Please Login or Register  to view this content.
    How to create a userform:
    https://www.contextures.com/xlUserForm01.html
    https://analysistabs.com/vba-code/ex...rform/listbox/

  3. #3
    Registered User
    Join Date
    05-13-2010
    Location
    Kozhikode, Keral, India
    MS-Off Ver
    Microsoft Office home and student 2019
    Posts
    49

    Re: VBA file dialog:- show files without a certain string in filename

    Hi Dante, many thanks for your suggestion.
    But since I am already using a filedialog, I would want to filter the files in this filedialog only.
    OR
    Do you mean that I should shelve the filedialog and go for the user form instead, as suggested?

  4. #4
    Forum Contributor Dante Amor's Avatar
    Join Date
    07-24-2020
    Location
    MEXICO
    MS-Off Ver
    Excel 2013
    Posts
    212

    Re: VBA file dialog:- show files without a certain string in filename

    I mean you should use the userform instead of the filedialog.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Trouble with parsing filename to file save as dialog box
    By TuboDieselOne in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2018, 07:13 AM
  2. [SOLVED] MACRO: Store name of selected file as string w/ import data file dialog box
    By AnnieMcken in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2013, 02:13 PM
  3. [SOLVED] Change title in an open dialog box and keep selected filename as string
    By AnnieMcken in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2013, 03:55 AM
  4. [SOLVED] Open file with a specific string in the filename
    By vikas.mehta80 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-18-2012, 05:19 PM
  5. Macro to open most recent file with a particular filename string
    By naitnait in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-22-2010, 01:47 PM
  6. How to not show save dialog after reading from excel file.
    By philg1984 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-13-2006, 04:45 PM
  7. Open find file dialog multiple files
    By Magius00 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-06-2005, 05:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1