Results 1 to 3 of 3

How to append date to the filename and save it in a different folder?

Threaded View

chunkyp How to append date to the... 03-10-2017, 03:45 AM
dflak Re: How to append date to the... 03-10-2017, 06:25 PM
chunkyp Re: How to append date to the... 03-16-2017, 07:33 AM
  1. #1
    Registered User
    Join Date
    03-09-2017
    Location
    Monrovia
    MS-Off Ver
    2013
    Posts
    57

    How to append date to the filename and save it in a different folder?

    I am trying to save and replace(if it already exists) an excel workbook into a specified folder. While saving I want the date to be attached to the filename. Ex: D:\Excelbooks\wb1_07-03-2017.xlsm. If the file already exists I just want it to be replaced by the most recent one.

    Currently rather than replace the filename, I’m actually creating a new folder everytime with the date attached. This creates a problem that there will be too many folders created.

    Here I'm actually creating the folder name with date attached. But rather than creating a new folder I would like to save/replace(if it already exists) the workbook into D:\Excelbooks
    DateString = Format(Now, "yyyy-mm-dd")
    FolderName = dUMMY1.Path & "\" & dUMMY1.Name & " " & DateString
    MkDir FolderName

    Also how can I make the code to run at a pre-determined time say 10AM GMT every Monday to Saturday; rather than click the submit button everytime to save it?
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Save file in sub-folder and filename as cell value
    By get2guy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2017, 12:44 PM
  2. [SOLVED] Save a workbook to a folder path in textbox2 using textbox1 as filename
    By yoko21 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-24-2013, 03:59 AM
  3. Save as CSV to specific folder on desktop and current date as filename
    By stokiejames09 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2013, 05:52 PM
  4. Generate filename and save in folder
    By ajasons in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2012, 04:59 PM
  5. Replies: 0
    Last Post: 10-10-2012, 03:51 AM
  6. Replies: 3
    Last Post: 07-09-2012, 03:09 PM
  7. Create Folder with system date then save file to folder
    By cartotech81 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2009, 02:12 PM

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