+ Reply to Thread
Results 1 to 3 of 3

How to save file in respective month folder as per current year vba modification

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    How to save file in respective month folder as per current year vba modification

    Hi all,

    In sub which will convert file to PDF and save it to assigned folder and then attach it to email in outlook.
    All works fine.

    However is is possible to modify the code to save fole to respective month folder ( as per current date and year)??

    e.g.
    I have created folder Named 'Trial' in C drive .
    This has sub folders 2014, 2015, 2016, 2017, 2018
    Each year folder will have sub-sub folders month wise like
    This has sub folders as Jan , Feb , Mar , Apr .... till Dec
    Now e.g.
    if date when the pdf was created is 23/4/14 then it is saved in C:\Trials\2014\Apr automatically.
    Currently every year I keep creating new folders etc... bit primitive though.

    Part code is as follows and I request help please.
    Kind regards
    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: How to save file in respective month folder as per current year vba modification

    Hi again,
    I tried to look on web for solutions, but found none.
    hope I get some help please
    Kind regards

  3. #3
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: How to save file in respective month folder as per current year vba modification

    Hi all,
    I managed the code to create a folder based upon current date and any specified cell in column B.
    May be this can help in marrying it in the original code.
    Please Login or Register  to view this content.
    Kind regards

+ 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. VB Script to save excel file appending Month and Year in the filename
    By alexgempesaw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2014, 02:29 AM
  2. Replies: 4
    Last Post: 09-09-2013, 05:06 AM
  3. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  4. [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
  5. macro save file for current year and month with a file name SHReportddmmyy.xls
    By evwang in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2011, 10:38 PM

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