+ Reply to Thread
Results 1 to 5 of 5

List of files in selected folder and subfolders

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    List of files in selected folder and subfolders

    I am using the following code, developed by other/s in this forum, to list all the files in a selected folder and its sub-folders.
    It works.
    However the user can only select the folder within VBA editor.
    Is there a way to incorporate a user dialogue to choose the folder (such as "msoFileDialogFolderPicker").

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    09-28-2014
    Location
    harbin,china
    MS-Off Ver
    2007
    Posts
    162

    Re: List of files in selected folder and subfolders

    Modify sub "TestListFilesInFolder" like this

    Please Login or Register  to view this content.
    Last edited by simcode; 12-09-2015 at 03:56 AM.

  3. #3
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: List of files in selected folder and subfolders

    This won't work.
    I get an error message "Compile error: Argument not optional".

  4. #4
    Forum Contributor
    Join Date
    09-28-2014
    Location
    harbin,china
    MS-Off Ver
    2007
    Posts
    162

    Re: List of files in selected folder and subfolders

    Yes, i forgot there are to parameters.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: List of files in selected folder and subfolders

    Thank you again.

+ 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. [SOLVED] list of subfolders in folder - without files and sub-subfolders
    By MartyZ in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2022, 10:56 AM
  2. VBA that goes through all xls files in folder and subfolders
    By Acxer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2015, 09:06 AM
  3. [SOLVED] Loop through and summarize all subfolders of selected top level folder
    By Webbers in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-04-2015, 10:56 AM
  4. list subfolders and files of main folder with details
    By buerere in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2014, 10:44 AM
  5. Adapt macro to create list of all PDF files in folder, including subfolders.
    By Glensafro in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2013, 06:33 AM
  6. list excel files when a folder is selected
    By Aishashk in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-12-2013, 07:08 AM
  7. Counting files in folder including subfolders also and folder size
    By mido609 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 03:26 PM

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