Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

amend vba to reflect -1 day

Posted on 2014-01-09
4
Medium Priority
?
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

721 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