+ Reply to Thread
Results 1 to 6 of 6

Deal with foldernames

  1. #1
    Registered User
    Join Date
    11-09-2006
    Posts
    2

    Deal with foldernames

    Hi there,

    I am trying to create a macro that picks the name of some folders (around 300) and writes them in cells in the spreadsheet.

    I am thinking in some function similar to GetOpenFilename that allows to pick the name of one file and write it into a variable, but that allows you to work with 'folder names' and not 'file names'

    What I would like to do is a macro that automaticaly picks up the first name stores it on a cell and goes for the next. And so on...

    Can anybody help on this?

    I'd love not to have to go on to that manually...

    Thanks in advance!

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon

    You want a macro that lists all directorys in a given directory?
    Is this OK?

    Please Login or Register  to view this content.
    Copy it into an empty module and run the macro "Test".

    HTH

    DominicB

  3. #3
    Registered User
    Join Date
    11-09-2006
    Posts
    2
    Ok? Just Ok? No! It is almost exactly what I was looking for!

    Thanks and re-thanks for the fast answer!

    This will keep me away from an awfull copy to spreadsheet boring and long work.

  4. #4
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163
    This is neat but over my head.
    Would it be hard to have this list the files in a selcted folder?
    Regards

    Rick
    Win10, Office 365

  5. #5
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning Rick_Stanich

    If you fancy a ready mad solution, download my multi-purpose add-in via the link below - it has over 200 tools, one of which will do what you want. Once installed, go to Ultimate > Information > List Files in Directory.

    If you want to use the code in your own workbook, this is the code that drives that particular utility (directory picker and all) :

    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  6. #6
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163
    DominicB
    Thank You for your help!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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