+ Reply to Thread
Results 1 to 4 of 4

VBA - Open an unknown file name with known date in

  1. #1
    Registered User
    Join Date
    06-28-2006
    Posts
    28

    Unhappy VBA - Open an unknown file name with known date in

    Hi,

    I would like to be able to open an file name from a known directory that has an unknown file name in, but a date that is known within the file name. For example the file name would be "finish_sdfsdfsd_userx_YYYYMMDD_xxxxxx.txt" where the date is the YYYYMMDD that is known and the rest of the file name would change.

    The date will always be in the same number of characters from the end of the file path.

    Normally I would use something along the lines of:

    Please Login or Register  to view this content.
    Where refFILE was reference on a spreadsheet to include the date. However this will only work with a known file name.

    Any ideas as to how to do this. Your help is very much appreciated
    Last edited by dgo; 01-30-2013 at 12:47 PM.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: VBA - Open an unknown file name with known date in

    You could use this code:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    06-28-2006
    Posts
    28

    Re: VBA - Open an unknown file name with known date in

    Thanks Antonio - I'll take a look this afternoon!

  4. #4
    Registered User
    Join Date
    06-28-2006
    Posts
    28

    Re: VBA - Open an unknown file name with known date in

    That works fine - thank you very much.

+ 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