Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Question Unanswered: Is there a way to save a file by date??

    I have a folder for each month. I would like to save our current proposal to the folder by it's month.
    There is a cell ("N10") which contains the date we wrote the proposal. Is there code I could write to have it save to the proper folder? I can change the names of the folder if it makes it easier.

    Here are the Folders I have right now:
    These folders are in path (C:\WINDOWS\Personal\Completed Proposals\)
    1January2004
    2February2004
    3March2004
    4April2004
    5May2004
    etc.

    Here is code I have right now:
    Path = "C:\WINDOWS\Personal\Completed Proposals\"
    Path2 = "C:\WINDOWS\Personal\Surface Systems\"
    ActiveWorkbook.SaveAs Filename:= _
    Path & "Proposal " & _
    Str(Application.Range("N2").Value), FileFormat:=xlNormal _
    , Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
    CreateBackup:=False

    Appreciate any help in addvance!
    Michael
    Gotta to do some code

  2. #2
    Join Date
    Feb 2004
    Location
    CT,USA
    Posts
    250
    create your path on the fly:
    path="C:\WINDOWS\Personal\Completed Proposals\" & varMonth
    fileName= path & \filename

    Then use the fileName in your code to save the file where you would like it.

  3. #3
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271
    Thank you so much for responding!
    This will work fine in May. What about when it's June and everything is getting saved in the May Folder?

    Michael
    Gotta to do some code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •