Save As Every Date
Feb 15, 2007
Is there a code that I can use to save a spreadsheet as every date of the year? For example my spreadsheet is called GC Reconciliation.
I currently save each date one by one. Is there a way to save it one time as every date?
View 9 Replies
ADVERTISEMENT
Aug 15, 2014
I am trying to create a macro to run from a form button, within a report, to save a file to a variable file path and name depending on the date value in cell B5.
The format of B5 looks like - 13/08/2014 16:39
The file path has folders for each year in format "yyyy" with each year having sub folders for each month in format "mm".
The file name is just the date only and is formatted "dd.mm.yy" e.g. 13.08.14
I have tried the code below in various permutations but always end up with an error - Method 'SaveAs' of object '_Workbook' failed.
[Code] ......
View 3 Replies
View Related
Mar 11, 2014
am using Excel 2010 and having issues trying to save a worksheet to a specified file location with the save date....
I have tried several posts form this forum and elsewhere and can't seem to get the macro to do what I want.....
I want to save a 'worksheet' from an open workbook that I use for updating information to the same file path as the workbook with the date the file saved...
View 6 Replies
View Related
Mar 30, 2009
I have a workbook containing a sheet called Floor Plan, and in cell C2 I am using the =NOW() function. I have a macro within the workbook that brings up the Save As dialogue box and enters the contents of cell C2 as the filename, but I can't save it as that because the date is in --/--/-- format. What I would really like to do is save the workbook on close as 'Floor Plan' followed by todays date, automatically if possible.
View 9 Replies
View Related
Mar 22, 2007
I want my macro to save as date and filename at the end. I have attempted it with the code below but i cannot get it right. If today is monday i need it to save as fridays date, but if today is tuesday-thursday then i need it to save as the day before todays date...
View 9 Replies
View Related
Aug 16, 2008
In the code that i have, vb is making me a excel file and saves it with the title i putted.
I want him to save my files like this: example dd:mm:yyyy
Here is the
Sub Export()
Workbooks.Add
ActiveWorkbook.SaveAs Filename:= _
"D:Sablon citiriCalea 13 Septembrie_Sablon citiri.xls", FileFormat:= _
xlExcel8, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
Call MsgBox("Va rog sa asteptati pana se creeaza registrul de lucru.
Some of the words are in romanian.
The bold text ,if is possible, it should be like this: D:Sablon citiriCalea 13 Septembrie_dd:mm:yyyy.xls (the date when i do the saving).
View 9 Replies
View Related
Apr 16, 2009
I'm trying to write a VBA code to save a file with the word "northeast" and then today's date. So today the file would be saved as "Northeast - April 16, 2009". I can't seem to figure it out. Anyone have any ideas?
View 9 Replies
View Related
Sep 11, 2006
i would like to be able to save my new workbook as "SL" with todays date next to it. so if i run my macro today it would save as SL 11/09 if i run it tommorow it would be SL 12/09
View 2 Replies
View Related
Nov 17, 2006
I work in a fiberglas manufacturing plant where we use a single, daily "count" sheet to track production. At the end of the 24 hour workday we clear the sheet and reuse it. This sheet is published as a web page so others can view it throughout the shift. What i want to do is to be able to either automatically or by running a macro either save each day to a master workbook, where each sheet is assigned the title or name of the month and day, i.e. 1116 for november 16 OR have each sheet saved individually to a common folder with the name of the month and day. I would appreciate any guidance, suggestions or code.
View 9 Replies
View Related
Dec 19, 2007
I have a file that I enter data into and I want to be able to save the file(s) in a folder according to the date. Can the following code be amended to save the files in a folder with the name being the date. Example:
If I enter data in today - when I clicked Save File As it would look for a folder named 2007-12-18 and if it wasn't there it would create one and save all files with todays date in that folder. If I use the file tomorrow it would look for a folder named 2007-12-19 and save all files with tomorrows date in that folder.
Option Explicit
Sub Button14_Click() 'variation of shg's code
Dim SaveAsFile
SaveAsFile = Application.GetSaveAsFilename _
(fileFilter:="Excel Files (*.xls), *.xls")
If SaveAsFile = False Then Exit Sub
If SaveAsFile = ThisWorkbook.FullName Then
MsgBox "Please select another path and file name.", vbCritical, "Save As Error"
Goto ErrorHandler
End If
On Error Goto ErrorHandler
ActiveWorkbook.SaveCopyAs (SaveAsFile).....................
View 9 Replies
View Related
Apr 27, 2012
Am following the below steps to add a function that saves the last saved time of the sheet continuously:
1- Click on ALT + F11.
2- Choose This Workbook.
3- Insert a module.
4- Paste the following code:
[Code] ........
The I insert the defined function LSDate() into the cell i want the last saved date to appear in, but what happens after is that whenever i save the sheet this date doesnt update and when i click enter on the same cell it shows the error message #NAME?. So how can i solve this error and get the last save date updated instantly.
View 4 Replies
View Related
Oct 29, 2012
Is there a formula I can use to see what the last time the sheet was saved is without using visual basic
View 1 Replies
View Related
May 5, 2008
i have a macro that richard buttrey has so kindly helped with
View 14 Replies
View Related
Oct 27, 2008
Found this macro in a differant thread for a date stamp in A1. I changed it to C38. Also I have it in the workbook module. It is supposed to update the date stamp on save. I think if the data has been changed or not.
View 2 Replies
View Related
Dec 24, 2008
Below is a bit of a big macro i'm writing but I'm not sure how to edit my code to append the date after the filename. Then i'll need to refer to the exact filename later in the code?
View 2 Replies
View Related
Jun 16, 2009
I have found out how I save my document as workbook name and date, but now I want to add the saved file to a specific folder instead of just in my dokument folder. This is what I have done so far (SAVING FILE IN A SPECIFIC FOLDER):
View 5 Replies
View Related
Jul 2, 2009
So i have this macro that i been using for long time everthing works as expected but i will like to change the saving part to save as specific name plus todays date
Sub EQUIPMENT_RETURNS(control As IRibbonControl)
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("D:J").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").Select
Selection.Cut
Columns("B:B").Select
Selection.Insert Shift:=xlToRight
Columns("B:B").Select...........................
View 6 Replies
View Related
Jan 8, 2013
How do I save a file with yesterdays date, within a macro. This is what i have now
Code:
ActiveWorkbook.SaveAs Filename:= _
"S:Marks dataRENAME ME.xlsm" _
, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
I want to replace Rename me with yesterdays date. When I run the macro every morning.
View 3 Replies
View Related
Jan 26, 2007
Is it possible to save a file with a date taken from a cell? For example:
I have an Excel file opened, in the cell A1 there is a date: 12.04.2003 (or any other date format). I want an Excel to save this document, but after I check the date of creation (modification) of the file under Windows, I want to receive the result 12.04.2004 (or any other, that was in the cell "A1" before pressing SAVE button).
I imagine, that there would have to be some external script running, that would change the system date for a moment, just after detection of pressing SAVE command.
View 9 Replies
View Related
Apr 24, 2008
Is it possible that each time I save a file it saves the filename along with date and time as the version of the file in a specific path
View 9 Replies
View Related
Feb 15, 2010
I want to schedule a print, for lets say every Sunday at midnight. I have managed to find some what of a solution by using the following vbscript and scheduling a print to default printer. Works perfectly if that is all I wanted.
Dim objExcel, objWorkbook, strFile
' Connect to Excel
Set objExcel = CreateObject("Excel.Application")
strFile = "C: est.xls"
' Open the Excel File for Printing
Set objWorkbook = objExcel.Workbooks.Open _
(strFile)
' Print to Default Printer
Set objSheet = objExcel. ActiveWorkbook.Worksheets(1)
objSheet.PrintOut
objExcel.ActiveWorkbook.Close
objExcel.Application.Quit
I do not want to print to an actual printer, therefore if I set my default printer as the document writer, the vbscript gets it as far as the "Save As" page. Is there a way I can add to this vbscript so it will save as well? Can I get it to save as "name"&[DATE], thereby having it save as a different name each time?
Can I change this vbscript to print to a named printer rather then a default printer? I am sure a PDF convertor may be of some assistance with this, but I do not have an PDF converter on my computer, and as this will be carried out on a computer that I will not have administration rights, I can not download one.
View 2 Replies
View Related
Nov 7, 2006
The following macro is returning a 1004 runtime error.
FName1 is a book title PHOTOSHOP MADE EASY which is trimmed to remove blank spaces at the end.
FName2 is the date =Today() formatted dd/mm/yy.
When the 1004 error appears the filepath shown looks like this ...
View 5 Replies
View Related
Dec 13, 2006
I have an excel workbook that needs to be updated daily (new figures replace old ones at the moment), Want I want to be able to do I after filling in the cells, through that workbook be able to create a new identicle excel file for that day, with the name of the file being the date for that day, so basically at the end of every day a new file is created in a sought of archive. I understand I can just "Save As" every day, but the person that I am doing this for is .... well not the most competent of people.
View 2 Replies
View Related
Sep 18, 2007
I got this timesheet that i what to write a command button that will save the document as the employee name thats in cell B2 combined with the date thats in B5 to the desktop and then start a new blank timesheet.?
View 2 Replies
View Related
Jan 4, 2008
I'm working on creating a computerised invoicing system for where I work, and right now I'm creating a Day Book file.
I want the name of the file to simply be the date which it was created, in YYYYMMDD format. However, I keep getting the error message and am not sure what has gone wrong.
Please note that in the day book template, cell F1 contains the formula
=TEXT(E1,"yyyymmdd")
which may be useful to know in the later part of the code.
from the code below?
Private Sub DayBook_Click()
Select Case MsgBox("Proceed? (Ensure that a Day Book has not already been created)", vbYesNo Or vbQuestion Or vbDefaultButton1, "Day Book Creation")
Case vbYes
Dim strName As String
'copy today's date from invoice template
Range("H4").Select
Application.CutCopyMode = False
Selection.Copy
View 3 Replies
View Related
Nov 6, 2009
I have a spreadsheet that I send emails from. Currently I use the .PrintOut command just before .send and it prints the email to the default printer. Instead of printing to the printer i want to print the email to pdf or any file for archive purposes. I would also like the file to be located on a network drive with a file name from a cell in the spreadsheet with todays date. Is this possible?
Currently the code looks like this:
VB:
With OutMail
.to = sh.Range("A1").Value [code]....
View 9 Replies
View Related
Jan 23, 2008
I want to write a piece of code that will automatically do a SaveAs on the workbook I'm using, say every hour, and add the current system date and time to the filename every time.
View 4 Replies
View Related
Jun 14, 2009
In Cell N1 i have 02/02/09 but i have formatted it to look like Feb Invoices 2009. In the strpath below it saves the file to a folder In desktop/"Cell N1" But it tries to save it as c:Documents and SettingsDaveDesktop229 I would like it to save as c:Documents and SettingsDaveDesktopFeb Invoices 2009. Also if the folder does not exist the macro fails. How can change this macro to
1. Change the folder from 020209 to Feb Invoices 2009
2. If folder does not exist then create it.
View 2 Replies
View Related
Aug 9, 2012
I want to create a macro that when executed changes the name of "File1" to "File1 - Edited 8-9-2012". With the date being today's date (variable). This file is going to be emailed to someone who will then execute this macro.
Is there a way to prompt the Save As window with the updated file name so the user can save the file where ever he/she wants?
View 9 Replies
View Related
Jun 5, 2013
I created a report that runs each weekday morning, using data from the previous workday.
I have written code that saves the file into a LAN directory as "BEST CASH MM-DD-YYYY" with the variables being the previous day's date.
My problems is that when I run the report on Monday morning using Friday's data, of course it's including Sunday's date and not that previous Friday...
Here's the test code I'm working with right now; I'm using a folder on my desktop until I get the code right, then I'll change it to the proper LAN directory:
ChDir "C:UsersC700MDesktopTEST"
ActiveWorkbook.SaveAs Filename:= "C:UsersC700MDesktopTEST" & "BEST CASH " & Format(Date - 1, "mm-dd-yyyy"), FileFormat:= xlOpenXMLWorkbook, CreateBackup:=False
View 7 Replies
View Related