+ Reply to Thread
Results 1 to 7 of 7

get list of folders in a directory

  1. #1
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    get list of folders in a directory

    Hi,

    I have MyDirectory defined as follows:
    Please Login or Register  to view this content.
    I am trying to get a MsgBox with a list of the folders within the "JOBS" folder (no need to list subfolders).

    Please advise.
    Thanks

  2. #2
    Registered User
    Join Date
    09-10-2014
    Location
    Matrix
    MS-Off Ver
    2010
    Posts
    70

    Re: get list of folders in a directory

    Please Login or Register  to view this content.
    (*) Reputation points appreciated.
    excelbs.tk

  3. #3
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Re: get list of folders in a directory

    Hi michson,
    I tried your code, but when I run it, nothing happens.
    FYI
    Thanks

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: get list of folders in a directory

    Look in the Immediate window; do Ctrl+G if it's not visible.
    Last edited by shg; 09-30-2017 at 04:36 PM.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Re: get list of folders in a directory

    shg,
    Yes it is there.
    Thanks

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: get list of folders in a directory

    You're welcome.

  7. #7
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: get list of folders in a directory

    To get your message box listing the folders, build a message string like this

    Please Login or Register  to view this content.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

+ 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] VBA to create folders in a directory
    By William... in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-05-2017, 05:58 AM
  2. Can't delete folders in My Document directory.
    By troy_mech in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-10-2016, 03:25 AM
  3. Code to set combo box to list folders in a directory
    By Kezwick in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-08-2013, 07:07 AM
  4. Found Code to List All Folders and Size in Certain Directory. Need Help Editing.
    By jcranst in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2012, 03:11 PM
  5. Generate a list of folders within a directory
    By TRT7G7 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2010, 11:24 AM
  6. Locate a File within a Directory's Folders
    By toocold in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-01-2008, 11:48 PM
  7. List of folders in a certain directory
    By woolyhedgehog in forum Excel General
    Replies: 1
    Last Post: 10-19-2005, 12:05 PM

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