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?
I searched this forum to find a macro that will do what I'm describing below. There seems to be quite a number of macros doing almost what i want, but most require a macro to be run, filename to be entered, etc...
I want the macro to automatically append the current date to the filename when it is saved. It must save it in the same directory where the file was opened from, and the name must be exactly the same as before, except that it must remove the previous date appended to the filename, if there was one appended.
I don't want to run the macro for this to happen, the normal File Save command must do the trick...
Thus c:my documentsTest.xls will become c:my documentsTest 29102009.xls; and c:my documentsTest27102009.xls will become c:my documentsTest 29102009.xls
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?
I have a spreadsheet that from a button I want to run a macro that will input todays date, the value in cell A1 as the filename into a default dialog box that is at a default file path. I have been trying to do this for several hours and can not completely get it done.
I want a macro that will save a copy of the current file using specific naming convention. My file is called OTR2CMMASTER - I want the macro to save a copy as OTR2CMSAGE(CURRENTMONTH/YEAR). The OTR2 is a named field (ProjectCode) in the workbook.
I'm trying to use the code below to paste special my first sheet to remove the formulas, then delete all other worksheets then save as a reference number (which is linked to the worksheet im saving) but I also need it to save in a specific folder.
I'm trying to record a macro that calls up the saveas dialogue and uses a filename from a cell (it's the w/c date). I can start recording the macro, open the dialogue box and copy the contents of the cell but i can't get it to paste as the filname.
What I'm trying to achieve is to allow users of a muli-sheet workbook to be able to click on a 'save' button on any sheet and have the workbook save with a filename which includes the current week commencing date. This way all the weeks changes will be in just one file and from the following monday a new file will be started the the old one left alone as an archive.
way for my engineers to save a field ticket with a certain name based on data from a couple of cells in the worksheet. Re: Auto generate "Save As" filename from text and tried to use some code posted in the thread, but I an still not having any luck.
What I want to do is create an active X button when clicked on, would save the workbook to a certain folder. I want the name to look like this:
SO1!M3_SO1!M6_SO1!H2.xls
This is what I have so far:
Private Sub SaveMe() ThisWorkbook.SaveAs Filename:="C:usersdefaultdesktop" & Range("SO1!M3").Value & Format(Range("SO1!M3").Value, "text") & ".xls" End Sub
Would I click "general" or "workbook" in VBA when I enter this code?
Our business has a spreadsheet set up for invoicing. A Macro has been created to increase the invoice number, save to the desktop as a PDF with a file name taken from the cells
This is working on my colleagues mac but when we've loaded onto my computer it errors, when I debug I am getting the following error:
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.
I have a filename 'filename-12-14-2014' where i need to extract date information from the filename and insert a new heading in the file 'date' in the first column and write the extracted date till the end (until data exists). I can write the new column name but i could not write date in all the fields. code i wrote is below
this is for extracting date from the filename. the 4th lines throws me the error?
I picked up a bit of code to create a CSV with a | delimiter. so that I could save the file with a date added onto the filename. i.e. myfile060309.csv.
I need to add a date to the existing filename it is being saved as. Currenntly the filename is saved as follows:
x = Cells(Rows.Count, 1).End(xlUp).Row For a = 2 To x y = Cells(a, 12) Workbooks.Add ("C:Documents and SettingsDesktopTemplate.xlsx") ActiveWorkbook.SaveAs FileName:=y Next a
I want the filename to stay the same as above but add "-r-"a number entered into a textbox representing the revision and then the date the file was saved in the following format dd/mm/yy.
The form containing the text box has been scripted and works fine. The string entered in the textbox currently resides in the Active sheet being saved in cell "E4".
Below is a completed Filename. Note the RED is what i need to add.
Every week we produce a report that has the filename: Master_BER_Pending Revokes Report_YYYY-MM-DD.xlsm
Some of the information from this workbook needs to be pasted into a new tab on a different workbook. The new tabs naming convention is simply "DD MM". Currently I've got a command prop that asks the user to enter it in manually. See below
VB:
Dim newsh As String newsh = InputBox(Prompt:="Enter new tab name", Title:="Tab Name", Default:="e.g. '05 05'") Sheets.Add After:=Sheets(Sheets.Count) Sheets(Sheets.Count).Select ActiveSheet.Name = newsh
The user gets the information for the month and day from the filename of the report that was produced. What I need is the DD and MM to be extracted from the filename and used to name the new sheet.
I have a folder full of sales reports, all of the files are given a consistant format e.g. 09_wk50. I have a macro that do various calculations in each book. I now need a calculation based on the report date.
I am able to get the file name in the sheet so that I am just left with the value above (09_wk50) but I need to be able to get an actual date from that value.
I need to be able to get the monday of the week given. for the example given i would want the date 13/04/2009 because of week 50 in 2009, the 13th is the Monday.
I would like a macro to be able to save 26 tabs within the one document to individual PDFs.Preferably I would like to be able to specify each time exactly which tabs get printed, because often I don't need to print all 26, just the first 10 or so.I would like each PDF to automatically be named with the value in cell E10 of each tab.E10 already has a formula to create its final value. It references cells from other tabs within the same document. Hopefully the fact that this cell has a formula in it won't affect my ability to use the resulting value as a 'save as' reference?I would like it if the PDFs save to the same location as the Excel sheet from which they're generated is located. The location of the excel sheet will change every three months, so I'd prefer not to specify a location with a specific filepath, as it will have changed by the time I run the macro again.
I'd like to add a "save as" function into an existing macro that would automatically save my worksheet in a network folder using a filename and today's date (no slashes). I have read several other posts with a similar Q, but mostly what I am finding is answers with a very "situation specific" copy/paste-able macro.
I have a csv file named "BB31_2013-08-01". I would like to open this file via vba and this is not my only file. I also have another similar fileames such as "BB31_2013-08-08", therefore, I try to create some function like yyyy, mm & dd where I can modifie it easily for next file.
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...
I have an issues database that lists issues by [URL].......
I'm working on a test plan where we can enter an issue under in to a cell between J3 and J100, for instance... "1111".
I've been trying to figure this out all morning.. but I would like to create a macro or script that automatically adds a hyperlink to the cell with an issue number...
Append "http://WEBLINK.com/" & "cell.value" Or something like that.
I've got data in a table that has am induvidual "job number" assigned to each row, but this job number could have a variation such as 1000A 1000B 1000C but they may not necessarily be one after the other in the table (other job numbers may appear in between) so i need a to macro to remove all job numbers lets say that start with 1000 and paste them and the end of the table. so i end up with consecutive numbers. Can this be done? I've played around with the find funciton to loop through the column and find all relating job numbers then cut the entire row but cant quite seem to get it to work
I have a userform with 3 Comboboxes, all of which need to be populated from the dropdown option before OK is pressed. I haven't used any fancy names as this is just a straightforward (or so I thought) entry form ... the UserForm is called UserForm1 and the 3 ComboBoxes are called ComboBox1, ComboBox2 & ComboBox3. I have tried to be economical with my validation routine but I cannot get an incremental variable added to the end of the word "ComboBox" to be recognised ... my code is below :
Private Sub Validate_ComboBoxes() While MyComboCount < 3 MyComboCount = MyComboCount + 1 MyComboBox = "ComboBox" & MyComboCount Select Case "UserForm1." & MyComboBox <<<< This fails Select Case UserForm1.ComboBox1 <<<< This works Case "" MyValidCheck = MyValidCheck + 1 Select Case MyComboCount Case "1" MsgBox "Enter the number of weeks for this period" Case "2" MsgBox "You need to enter a start date" Case "3" MsgBox "You need to enter an end date" End Select End Select If MyValidCheck > 0 Then MyComboCount = 4 End If Wend End Sub