+ Reply to Thread
Results 1 to 5 of 5

Opening File with dated name each day?

  1. #1
    Registered User
    Join Date
    06-08-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    68

    Opening File with dated name each day?

    I would like to open a certain file everyday. However each day this file is created and named with the date, for example Production_FixYYYYMMDD.csv, in VBA how do I accomplish this? The alternative I could think of is to create a .bat file to copy that file over to a separate directory and rename it Production_Fix.csv and just use that, but if that batch file fails to run that would cause issues. Thanks for your help!
    Last edited by Tyler_Durden; 10-20-2009 at 12:51 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Opening File with dated name each day?

    You can use Date in VBA, eg

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-08-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    68

    Re: Opening File with dated name each day?

    Thank you... How would I code that to open the file and copy it to my other spreadsheet? This is what I recorded... Would I just put something like Workbooks.Open strCSV ?

    Please Login or Register  to view this content.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Opening File with dated name each day?

    If in doubt, test

  5. #5
    Registered User
    Join Date
    06-08-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2003
    Posts
    68

    Re: Opening File with dated name each day?

    got it thanks

+ 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