ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   previous day (https://www.excelbanter.com/excel-programming/375295-previous-day.html)

tigoda

previous day
 
so far i have the following bit of code:

ActiveWorkbook.SaveAs FileName:="C:\test\" & Format(Date, "ddmmm") & ".xls"

this works nicly saving the thing with todays date (I.e 17 Oct)

what i need is to save it with yesterdays date and i have no idea how to
-1day from the format

please help

Les Stout[_2_]

previous day
 
Hello Tigoda,

Try...
ActiveWorkbook.SaveAs Filename:="C:\test\" & Format(Now() - 1, "yymmdd")
& ".xls"


Les Stout

*** Sent via Developersdex http://www.developersdex.com ***

Stefi

previous day
 
Format(Date-1, "ddmmm")

Regards,
Stefi

€˛tigoda€¯ ezt Ć*rta:

so far i have the following bit of code:

ActiveWorkbook.SaveAs FileName:="C:\test\" & Format(Date, "ddmmm") & ".xls"

this works nicly saving the thing with todays date (I.e 17 Oct)

what i need is to save it with yesterdays date and i have no idea how to
-1day from the format

please help


tigoda

previous day
 
that easy eh?

thanks!

"Stefi" wrote:

Format(Date-1, "ddmmm")

Regards,
Stefi

€˛tigoda€¯ ezt Ć*rta:

so far i have the following bit of code:

ActiveWorkbook.SaveAs FileName:="C:\test\" & Format(Date, "ddmmm") & ".xls"

this works nicly saving the thing with todays date (I.e 17 Oct)

what i need is to save it with yesterdays date and i have no idea how to
-1day from the format

please help


Stefi

previous day
 
Yes, XL knows several tricks to simulate everyday operations, it's worth
while to try them!

Regards,
Stefi


€˛tigoda€¯ ezt Ć*rta:

that easy eh?

thanks!

"Stefi" wrote:

Format(Date-1, "ddmmm")

Regards,
Stefi

€˛tigoda€¯ ezt Ć*rta:

so far i have the following bit of code:

ActiveWorkbook.SaveAs FileName:="C:\test\" & Format(Date, "ddmmm") & ".xls"

this works nicly saving the thing with todays date (I.e 17 Oct)

what i need is to save it with yesterdays date and i have no idea how to
-1day from the format

please help



All times are GMT +1. The time now is 06:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com