Solved

amend vba to reflect -1 day

Posted on 2014-01-09
4
192 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
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
 

Author Comment

by:route217
ID: 39768684
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

809 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