Solved

amend vba to reflect -1 day

Posted on 2014-01-09
4
189 Views
Last Modified: 2014-01-09
Hi Expert's excel 2007

how would I amend so the date on the saved file is less one day from current date..


, InStrRev(ActiveWorkbook.Name, ".") - 1) ActiveWorkbook.SaveAs Filename:="\\jjjdje.com\file2\" & WbkName & "_" & Format(Date, "dd mmm yy") & ".xslm
0
Comment
Question by:route217
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
Nick Denny earned 500 total points
Comment Utility
, InStrRev(ActiveWorkbook.Name, ".") - 1) ActiveWorkbook.SaveAs Filename:="\\jjjdje.com\file2\" & WbkName & "_" & Format(Date -1, "dd mmm yy") & ".xlsm

and its still xlsm

Cheers
0
 

Author Comment

by:route217
Comment Utility
Cheers nick
0
 
LVL 13

Expert Comment

by:Ashok
Comment Utility
Replace Format(Date, "dd mmm yy")

with
TEXT(TODAY()-1, "dd mmm yy")
0
 

Author Comment

by:route217
Comment Utility
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now