If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Is there a way to save a file by date??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-04, 11:49
surfacesys surfacesys is offline
Registered User
 
Join Date: Mar 2004
Location: Greenville, SC
Posts: 271
Question 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
Reply With Quote
  #2 (permalink)  
Old 05-12-04, 16:17
poliarci poliarci is offline
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old 05-12-04, 16:23
surfacesys surfacesys is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On