+ Reply to Thread
Results 1 to 7 of 7

Need to find a specific folder by its name

  1. #1
    Registered User
    Join Date
    07-08-2012
    Location
    Venezuela
    MS-Off Ver
    Excel 2010
    Posts
    62

    Need to find a specific folder by its name

    Hello Everybory:

    As the title says, I need to find a folder by its name in order to get its path, that is becauce I am coding an app to be used by many computers.

    With some help from http://www.exceltrick.com/formulas_m...-dir-function/ I tryed to get that done with the below code I adapted from.

    It just does not work. It gives the subfolders of "C:\Users\", but I can not make it to see if the subfolder I am looking for is in one of those in "C:\Users\".

    Any help would br appreciated, I have been hardly working on this, with no success at all.

    Thank you,

    Nelson

    HTML Code: 

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Need to find a specific folder by its name

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need to find a specific folder by its name

    is the folder always located in the c:\users\username folder?
    If it is just that the username is different for each, but the relative folder location is the same then you could simply use something like:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Registered User
    Join Date
    07-08-2012
    Location
    Venezuela
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Need to find a specific folder by its name

    Hello Logit,

    Thank you for your response.

    Your code works, but I need to find the folder in the run, not by making a choice in a dialog box.

    I have tryed to adapt your code to do it so, but I could not code to loop all and each one of the folders in "C:\Users\" looking for the one I need.

    Thanks a lot anyway.

    Nelson

  5. #5
    Registered User
    Join Date
    07-08-2012
    Location
    Venezuela
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Need to find a specific folder by its name

    Great!

    Arkadi's code did the job.

    Thanks to Arkadi and Logit.

    Nelson

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Need to find a specific folder by its name

    Glad you have it working !

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need to find a specific folder by its name

    Glad we could help

+ 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. Find / open and update a file in a specific folder
    By mariec_06 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2016, 07:04 AM
  2. [SOLVED] vba to find and open specific folder
    By hassan khansa in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 02-08-2016, 11:06 AM
  3. Replies: 3
    Last Post: 12-28-2015, 08:14 AM
  4. [SOLVED] macro to find file in a specific folder and return data
    By Shellybelly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2014, 10:10 AM
  5. [SOLVED] Find and read excel files in a specific folder
    By kansalainen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-05-2013, 06:16 PM
  6. Replies: 1
    Last Post: 01-24-2006, 11:35 AM
  7. Replies: 1
    Last Post: 01-24-2006, 12:25 AM

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