+ Reply to Thread
Results 1 to 2 of 2

VBA function to scan directory and return file matching key word

  1. #1
    Registered User
    Join Date
    02-05-2019
    Location
    New Hampshire, USA
    MS-Off Ver
    2016
    Posts
    1

    VBA function to scan directory and return file matching key word

    I'm new to VBA programming and I've been stuck on trying to make this VBA function for a couple days now.

    We are a start-up company and due to multiple people filling multiple rolls the file naming structure of our prints is not completely uniform with the exception of a couple key words always being the name of a folder or the file itself.
    I would like to make a hyperlink that the computers at each workstation can click to automatically open up the corresponding pdf file.

    I have written up a skeleton frame of what the code should look like and if might be able to lend me a hand with this I would be greatly appreciative!




    Please Login or Register  to view this content.




    skeleton frame.PNG

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: NEED HELP! Trying to make VBA function to scan directory and return file matching key

    Use Dir() function.
    Ex: For Subfolders that contain "Rev".
    Please Login or Register  to view this content.
    If you need further help, I'd recommend uploading sample workbook.

    To upload file, use "Go Advanced" button and follow "Manage Attachments" hyperlink. It will launch new tab/window for managing uploads.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

+ 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. Recursively Scan And Open All CSV Files In Directory
    By jo15765 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2018, 06:01 AM
  2. [SOLVED] Return the directory/folder of the active file
    By Tony Valko in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-13-2014, 09:03 PM
  3. Excel 2007 VBA to scan a child directory - retrieve TOC details from each .doc
    By Paula.Scorchio in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2012, 02:11 AM
  4. Saving file in current directory after accessing file in another directory
    By vuxsa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2011, 11:37 AM
  5. Return full file path for files in directory
    By jeffreybrown in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2011, 12:42 PM
  6. Replies: 3
    Last Post: 06-11-2009, 07:08 PM
  7. Scan a Directory
    By jjresti in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-09-2005, 08:05 AM

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