Consulting

Results 1 to 3 of 3

Thread: Code to print folders, subfolders and files

  1. #1

    Code to print folders, subfolders and files

    Hi all,

    Is it possible to have a code that extracts the contents of My documents and desktop to one sheet as follows:

    My documents
    Subfolder-1
    files ..
    files ....
    Subfolder-2
    files ..
    files ....
    So on ..................

    Then desktop contents as well.

    After finish listing, save the worksheet in same excel file.

    Please help.

    Thanks in advance.

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    See if the workbook at #11 helps:
    http://www.vbaexpress.com/forum/showthread.php?t=36216

  3. #3
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    And also following KB entry if you are using Excel 2003 because .filesearch is not available in 2007 onwards versions.
    http://www.vbaexpress.com/kb/getarticle.php?kb_id=837
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

Posting Permissions

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