|
-
Oct 27th, 2000, 12:46 PM
#1
Thread Starter
Junior Member
Hello,
Is it possible to have a macro save a workbook with the same name everyday but at the end of the name put the current date?
I would greatly appreciate any example code if someone knows. Thank you and best regards.
-
Oct 27th, 2000, 01:07 PM
#2
Fanatic Member
I do not know about the Macro and Workbook, but in VB I use this code to append the current date to a folder name.
Code:
DestinationFolder = "c:\backups\travel\Data(" & Format(Now, "mm-dd-yy") & ")"
Result is c:\backups\travel\Data(10-27-00)
-
Oct 27th, 2000, 01:08 PM
#3
Lively Member
Yes you can do it.....
Hi,
Yes you can very well do that ....
Here is a sample.Have a look at it.
Code:
--------------------------------------------------------
sMonth = Format(Month(Date), "00")
sYear = Format(Year(Date), "0000")
sDay = Format(Day(Date), "00")
sFileName = "Whatever Name " & sYear & sMonth & sDay
xlApp.ActiveWorkbook.SaveAs "C:\" & sFileName
--------------------------------------------------------
In this way you can save with same name and with current date.
Hope this will help you
Good Luck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|