Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

amend vba to reflect -1 day

Posted on 2014-01-09
4
Medium Priority
?
197 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 2000 total points
ID: 39768500
, 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
ID: 39768515
Cheers nick
0
 
LVL 13

Expert Comment

by:Ashok
ID: 39768548
Replace Format(Date, "dd mmm yy")

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

916 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