+ Reply to Thread
Results 1 to 2 of 2

Excel macro to create a new folder and saveas active workbook

  1. #1
    Registered User
    Join Date
    07-30-2014
    Location
    Newcastle, England
    MS-Off Ver
    2007
    Posts
    4

    Excel macro to create a new folder and saveas active workbook

    Hi

    I am trying to right a macro in vba to save the master template I am working on as the previous month's name and year and create a new folder to save it in which is called the previous month's name. I also want the new renamed version of the spreadsheet to be left open after the button has been pressed.

    I have tried a few different things but can't work out how to create the new folder in the correct location I want to save.

    I want the file name to read 'July 2014' for example, and the new folder I want it saved in to be created in the following file path: I:\Sales \Reports and called 'July'.

    Any help will be appreciated. I tried to find another similar thread but couldn't find one where I could work the code how I wanted.

    Thanks

  2. #2
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Excel macro to create a new folder and saveas active workbook

    You can use the record macro button and it will use Visual Basic Editor screen (Alt+F11) and record most of your actions. Can you save a file and see what it does and open a file and see what it does.

    Please Login or Register  to view this content.
    Thank those who have helped you by clicking the Star * below their name and please mark your post [SOLVED] if it has been answered satisfactorily.

+ 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. [SOLVED] SaveAs a Worksheet to another file/folder while keeping the original open/active
    By DJBittner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2014, 12:13 PM
  2. [SOLVED] Macro to create new WorkBook and SaveAs file
    By mtodd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-21-2013, 09:10 PM
  3. Code to create New Folder (if doesn't exist) and then Save Workbook to folder
    By jenhawley in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-10-2013, 03:09 PM
  4. [SOLVED] Save Active Sheet As New Workbook in same folder of the original workbook
    By Taislin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-19-2012, 07:03 PM
  5. Macro to Create a set of folders and copy the active workbook
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-02-2009, 07: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