Generate a file name by date....

  • Thread starter Thread starter mlindsey54
  • Start date Start date
M

mlindsey54

What I'm trying to do is to name a file by date and then access that same
file the next day and use the data that's there for current date....

An example is:
All End-totals in file 06/21/09 will be Beginning-totals in currently
opened file that will be named the current date ( 06/22/09 ) at the end of
the day...

In a perfect world I'd like for this file to be automatically named and
saved. But if this can't be done I have no problem doing this my self...
 
'To save as current date
ActiveWorkbook.SaveAs "c:\" & Format(Date, "dd-mm-yyyy") & ".xls"

'and for opening previous day's file
Workbooks.Open "c:\" & Format(Date - 1, "dd-mm-yyyy") & ".xls"

If this post helps click Yes
 
I would like to do this in the workbook. I need to be able to acces the data
in yesterday's workbook from the current one thats being used and at the end
of the day when it is closed it will be save with today's date. There is info
in the work book that I want the current day's workbook to get from
yesterday's workbook. I'm having problems getting it to access the data from
the previous day like in the example I gave...how would I put it in there to
go get yesterdays end-totals.,
I can do it within the workbook from different pages but not from
yesterday's workbook...That's why I asked about how to generate a filename by
date..I also want to use current one to go back and get data from
yesterday's...I need this to be done automatically...Thanks for input and I
hope that you can help me out with this...
 
I would like to do this in the workbook. I need to be able to acces the data
in yesterday's workbook from the current one thats being used and at the end
of the day when it is closed it will be save with today's date. There is info
in the work book that I want the current day's workbook to get from
yesterday's workbook. I'm having problems getting it to access the data from
the previous day like in the example I gave...how would I put it in there to
go get yesterdays end-totals.,
I can do it within the workbook from different pages but not from
yesterday's workbook...That's why I asked about how to generate a filename by
date..I also want to use current one to go back and get data from
yesterday's...I need this to be done automatically...Thanks for input and I
hope that you can help me out with this...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top