Results 1 to 13 of 13

How do I save to a folder that is the current month and have it save to next month"

Threaded View

  1. #1
    Registered User
    Join Date
    06-25-2014
    Location
    Alberta, Canada
    MS-Off Ver
    2010
    Posts
    19

    How do I save to a folder that is the current month and have it save to next month"

    Hi! Here is a macro I am using to save a workbook using 'Save As' (I can't take credit for the full macro. A forum member was kind enough to help me with it. The only part I added was the 'Open' portion.)
    I have it open a template workbook we use, and then perform a save as, pathed to a specific folder on the desktop. We do this every night just before midnight.
    What I haven't been able to figure out is how to have it save to the next month folder (The folders with the name of all the months are already created) on the last day of each current month.

    For example. In my code, the final folder in the path is the current month July. On July 31 when I run the macro, I would like it to save it in the folder called August.

    Is there a way to code this so it will recognize what the current month is and then at the end of each current month save it in the next month?

    Here is my code.

    Thank you in advance.

    Sub OpenSaveAs()
    ' Open
    '
    
    '
        Workbooks.Open Filename:= _
            "C:\Users\Chris\Desktop\Work excel\Original Log..xlsm", UpdateLinks:=0
    Application.DisplayAlerts = 0
    ActiveWorkbook.SaveAs Filename:="C:\Users\Chris\Desktop\Daily Logs DO NOT DELETE\2014\July\ " & Format(Now() + 1, "mmmm-dd-yyyy") & ".xlsx", FileFormat:=51, CreateBackup:=False
    Application.DisplayAlerts = 1
    End Sub
    Last edited by shikano53; 07-16-2014 at 10:56 AM. Reason: Solved

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to save file in respective month folder as per current year vba modification
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2014, 05:26 PM
  2. Replies: 4
    Last Post: 09-09-2013, 05:06 AM
  3. [SOLVED] Save invoice to folder by month and then save file by date and invoice
    By Val777 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2013, 02:57 AM
  4. [SOLVED] Macro to Save a PDF in folder by month
    By tomisthereason in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2013, 05:06 AM
  5. [SOLVED] macro to save file in current month
    By vivek_work in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2013, 07:07 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