Save Excel Sheet To A Specific Location Through Macro
I have a excel sheet which is completely formula driven and no macros in that.
I want to macro which can save that excel sheet to a specific location.
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Save To Specific Location As Cell Name
I've been searching for ages trying to work out how to do this but have so far only managed to confuse myself. i have office 2007 and I have found some code to convert an excel sheet to PDF, however I need it to saveas the contents of cell (e6) and save to a location on our network drives (C:TEMP).
View Replies!
View Related
Save As Macro With Location Prompt But Fixed File Name ?
For a sheet that many non-expert users will use on different systems I need a macro that let's them save, print and send the results of their work. So I made a macro that makes a copy of only 1 sheet of the workbook and saves it with a given name to a given location. The problem is that I want a location prompt to ask the user where they want the file saved, while giving/suggesting them a fixed filename. A lot of different users will make and use their sheets so I need a certain naming policy to manage all the files. (date, location, etc)
View Replies!
View Related
Macro To Save Worksheets As Workbooks- Name And Location To Change Each Month
I have a workbook with approximately 30 worksheets. This workbook already has a massive macro that I've written. I'd like to write a code that will take a designated worksheet, check to see if there is data in cell A2, if so, save it as a new workbook. The name of the workbook should be predetermined, for example "SIA April(Previous Month) 2008(Current Year) P-Card Import Template.xls" The months and years will need to change. The file to save it in will also change monthly- for example- G:PCard DirectoryCloses2008 ClosesApril(previous month) 2008(current year)
View Replies!
View Related
VBA Macro To Follow Hyperlinks & Save Files To Another Location
I am attempting to write an Excel macro that will be stored in a file called MacroFile. The purpose of the macro is to 1. Follow a hyperlink to an Excel file saved in a SharePoint type enviroment 2. Save the file to my laptop directory My Documents. Below is the code I have written. The code is following the hyperlink and saving a file but is the focus file is incorrect. Here is what happens: 1. Open up MacroFile and run macro 2. Hyperlinked file LinkedFile_1.xls is opened 3. File NewFile_1 is saved but contains the info from MacroFile 4. Hyperlinked file LinkedFile_2.xls is opened 5. File NewFile_2 is saved but contains the info from LinkedFile_1 6. Hyperlinked file LinkedFile_3.xls is opened 7. File NewFile_3 is saved but contains the info from LinkedFile_2 The files created are named correctly but have the wrong data in them. I need to know how to control which file is considered ActiveWorkbook. Sub LinkAndCopy() Application. ScreenUpdating = False Application.DisplayAlerts = False '**** Copy LinkedFile_1..................
View Replies!
View Related
Create Macro To Chart Data With Location As Object In Active Sheet
I have been trying to create a macro in excel to chart a selection of data and to output the chart on the active sheet where the data was taken (as opposed to a named sheet). So basically, I have about 300 worksheets with data, and I would like to have a button on each page that automatically charts that data when clicked, and outputs the chart to the page where the macro was clicked. However, I have not been able to figure out a relative reference that will allow me to make the LocationasObject reference simply the ActiveSheet as opposed to a specifically named sheet. See my code below, which references an output to a worksheet called "Charts". Right now, all of my charts are outputting to the sheet called "Charts", as opposed to the active sheet. Sub ConsDiscChart() ActiveCell.Offset(29, 11).Range("A1").Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlDown).Select ActiveCell.Offset(0, 1).Range("A1:B1").Select Range(Selection, Selection.End(xlDown)).Select ActiveCell.Offset(0, -1).Range("A1:C24").Select Charts.Add ActiveChart.ChartType = xlLineMarkers ActiveChart.Location Where:=xlLocationAsObject, Name:="Charts" With ActiveChart .HasTitle = False .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = False End With End Sub
View Replies!
View Related
Trusted Location - How To Save To And Access
managed to get a piece of code working to create unique sequential numbers for purchase orders, but only by "enabling all macros" which is apparently not recommended and could conceivably, as I understand it, leave a PC vunerable to viriuses contained in other imported files. Please bear with me as I'm very new to anything other than basic Excel functions; macros were, until last week, something I didn't even know existed, let alone how to use them. Anyway, having got my macro working, I understand that the best thing to do is put it in a "trusted location" from where it will work automatically without requiring operator input (whilst still maintaining high overall security), rather than "enabling all macros", but I have a couple of issues with this. Firstly, having created a folder in "my documents" as per the instructions, how do I save the macro there? What format should it be in? Surely not a word document? (as you can gather I am still really in the dark about all this). If not, what? Secondly, how do I direct Excel to access and run the macro from this "trusted location" folder, rather than the already existing "module1"?
View Replies!
View Related
Save & Return To Last Location
User selects 'go to page B' on page A. They look at an object then click the object to go back to page A. Once back on page A they need to check data on page B, but in the same general location as where they just looked. This is over simplified, but pretty much sums up what I need to do. The code I have now is below, but keeps sending me to the last selection on my current page. Public Sub SaveLocation(ReturnToLoc As Boolean) Static WB As Workbook Static WS As Worksheet Static R As Range If ReturnToLoc = False Then Set WB = ActiveWorkbook Set WS = ActiveSheet Set R = Selection Else WB.Activate WS.Activate R.Select End If End Sub Public Sub SetSaveLoc() SaveLocation (False) End Sub Public Sub GetSaveLoc() SaveLocation (True) End Sub
View Replies!
View Related
Set Autorecover Save Location In VBA
I have a macro which performs the auto save function perfectly. I'm looking at possible enhancements. 1. How to set autorecover save location in VBA? I know how to do this on the front-end i.e goto tools/options/save tab and set it there As i have disabled save autorecovery feature, autorecover save location is greyed out 2. How to create a backup of my workbook? So that my workbook will perform autosave and when i close this workbook at the end of the day all the latest changes are added to the backup and saved
View Replies!
View Related
Save As File Type To Parent Location
I've been searching all morning through various posts on this subject, but I can't find anything that I can adapt to my needs. Here is the code I have: ChDir "C:Documents and SettingsmynameDesktop" ActiveWorkbook. SaveAs Filename:= _ "C:Documents and SettingsmynameDesktopBook1.txt", FileFormat:=xlText, _ CreateBackup:=False This file will be used accross multiple computers and therefore the directory will always change. What I need to hapen, is for this code to save the workbook in the same directory as the origional file. I also want the file name to refer to a cells value, as I will be having the user define the name through a userform.
View Replies!
View Related
Generate A Folder Within A Specific Location
I am trying to generate a folder within a specific location (For now lets call it C:Jobs) that will be named as per the adjacent cell (Column H on attached) Obviously if the folder already exists I want the code to stop. But this code will have to generate a different folder for each row within the spreadsheet.
View Replies!
View Related
Macro Save Current Sheet
I have a form button I am currently using to save the workbook. However due to the workbook being so large is taking a little longer than I want to save. Is there a way to change the macro to save the current sheet only? Sub Save() ' ' ' ActiveWorkbook.Save End Sub
View Replies!
View Related
Hyperlink To Specific Location In Word Doc?
I have an Excel file to distribute to users. This file must contain Hyperlinks to a Word file which i will enbed in a sheet of the Excel file itself. My question is this: Is it possible to produce Hyperlinks that go to the specific part of the Word document? So far, i am only able to Hyperlink to the first page of the Word doc, by doing a macro.
View Replies!
View Related
Add Custom Menu At Specific Location On Toolbar
I would like to use the attached "menu maker" file I found on Ron De Bruin's site using a Sheet to build the menu, yet be able to place it before the Help menu as suggested by this site [url] by finding the position of Help. I have amended the code yet receive a "Compile error: Variable not defined" error.
View Replies!
View Related
Extract Data From A Specific Location In A Text File
I have been trying to work this out by looking at other posts (mostly concerning Binary Access) but can't figure it! The source text files I am using can vary in length from 4,000 characters to well over 100,000 characters. However the data I am looking for always starts 40 characters from the end of the file and is 10 characters long! I need my macro to pick out this data and store it as a string (so it can be added to an array and exported to a worksheet later)
View Replies!
View Related
Open Multiple Files, Check Current Month & Save To New Location
I have 40 files in one folder which I named it as "CA" + month's name that I am working on. I need to do analyse these files monthly and save it under new folder. how do I automatically save them in new folder and name them for that particular month. Also, each file has worksheet which has one cell as "Aug-07" and the cell next to it has number of that month that is "08". How do I automatically change this also based on the name of the file, because file name month and month in the cell are the same.
View Replies!
View Related
Macro To Save Sheet With Same Page Breaks As Original
I am trying to sort a macro out to save my sheet the same as the original when the button is clicked. When i try it from one location it is fine but from another location i get a print error, the error says prit quality is not right, when i debug it highlights: Print Quality = 600 I have tried changing it but keep getting the same error. Their maybe an easier way to do this but not being very good on VB i dont know what to do. This file is on a server and will be accessed from different locations.
View Replies!
View Related
Insert Row At Specific Location And Auto Fill Formulas From Above
What I need is to insert a row at row 59 and autofill the formulas including drop down list from the above row. This is what I have so far (Thanks to Reafidy and shg). Sub ChkDates() Dim c As Range Dim DelRng As Range Dim ArcRng As Range Dim i As Long Dim l As Integer Application. ScreenUpdating = False Worksheets("Report").Activate For i = 60 To 8 Step -1 Set c = Cells(i, 33) If IsDate(c) Then ..............
View Replies!
View Related
Macro Showing Only A Specific Sheet
Writing a macro that when runned will show only two specific sheets in a work book. If i run macro 1 the sheet "xxx" and "start" should be the only visible sheets in the work book. If i run macro 2 after having runned macro 1 sheet "yyy" and "start" should be the only sheets appearing.
View Replies!
View Related
Assigning Macro/Module To Specific Sheet
I have a workbook that has 2 similar worksheets. One called "Wood Shafts" and the other called "Iron Shafts" I have the macros worked out for the sheet called "Wood Shafts" and I just realised I need to apply similar Macros to the sheet called "Iron Shafts" (same functions but different values from different columns). Some how I need the code to be able to tell the difference between the two sheets. I am at a loss.
View Replies!
View Related
Disallow Specific Format Of Sheet Name From Macro
The below piece of code is from a macro that creates a summary sheet based upon the name of the worksheet. My problem is as follows: I have another macro which copies the summary sheet and renames it in the format dd-mm-yy and I want to exclude this from the macro that constructs the summary sheet. How do I modify line 4 to capture the exclusion of all sheets with format ##-##-##? Note: The current line is my poor attempt at doing it. If (A$ = "Template") Then Goto 10 If (A$ = "Create New Sheet") Then Goto 10 If (A$ = "Summary") Then Goto 10 If (A$ = Like "00-00-00") Then Goto 10 ' Process the current sheet Range("A" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C15" Range("B" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C16" Range("C" + Format(j)).FormulaR1C1 = "" Range("D" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C18" Range("E" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C19" Range("F" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C20" Range("G" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C21" Range("H" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C22" j = j + 1 10 Next i
View Replies!
View Related
Macro To Go To Specific Sheet Upon Choosing Option
Im looking to create a macro that goes to a specific sheet on my workbook upon selecting an option. Example being I open the spreadsheet and a list of options come up such as: BRIAN JOHN JAMES PAUL STEVEN Upon selecting one of those names you are transferred to the sheet named "BRIAN", "JOHN", "JAMES" etc etc etc
View Replies!
View Related
Macro To Copy To Specific Sheet Depending On Cell Value
This is the code I have: Sub Auto_Open() Sheets("Data").Select Range("A2:E32").Select Selection.Copy Sheets("May").Select ActiveWindow.SmallScroll Down:=-9 Range("A2").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A1").Select Sheets("Data").Select Range("A1").Select ActiveSheet.Paste Range("A1").Select Sheets("Sheet1").Select Range("A2:E32").Select Selection.ClearContents Range("A1").Select End Sub 1) How do I set this up so that if the cell Z1 reads 1, it will paste the data to the "January" Sheet, if Z1 reads 2, it will paste to "February" Sheet, if Z1 is 3 it will paste to "March"......
View Replies!
View Related
Macro For Filtering Spread Sheet By Date And Specific Person
I am fairly new to macros and I am currently working on a project where I would like to create a 2 buttons which will filter by date and by owner. The spread sheet I have is fairly large and is added to weekly. I have two objectives that I am trying to reach: First I need to filter for all past due task items from the Thursday of the week I am working in back and for a specific person (owner) by the finish date Second I need to filter for upcoming tasks one week out for a specific person (owner). The objective of this is so that on any given day a user can find any upcoming tasks that are due one week out. If this is not an option. My thought was to create an input box where the user can input the date and the information on the spread sheet will pull all past due items or upcoming tasks. These two items need to pull seperatly not together. I know I can create a macro by autofiltering by columns however I am trying to avoid having to go in and change the date each week. Start date is column E Finish date is column F Owner is column L
View Replies!
View Related
Macro To Copy Specific Data From One Sheet And Paste Into Two Sheets
There's one sheet that has a list of customers (this is updated very frequently). These customers are either ‘New’ or ‘Existing (as listed in a corresponding column) - would it be possible to have a macro that, when run, will place a copy of existing customers into a second worksheet (“view list – new”), and a copy of new customers into a third worksheet (“view list – existing”), with the main worksheet still listing both existing and new customers. As the main sheet that lists all customers is updated very frequently (with customers being added and removed throughout the day), would it be possible to clear all contents of the other two sheets that each list of 'existing' and 'new' customers will be copied into, before the two lists are copied into each of the two sheets (just to ensure there isn’t any data in there from the previous time each list was copied in). I’ve given this a go via the ‘record macro’ function - some users of this WB use excel 2000, and others use excel 2007, but it only seems to work on excel 2007 (which is what it was recorded on)…
View Replies!
View Related
Freezing A Sheet’s Tab Location
How can I freeze a sheet's tab location so it doesn't roll off of the screen? I have a workbook with 30 worksheets all hyperlinked off of the 1st sheet which is the INDEX sheet. The INDEX sheet only exists to make it easier for users to go directly to their desired sheet without tabbing horizontally through many sheet names. However when users use the bottom left arrow buttons to tab through the worksheets, the leftmost INDEX worksheet tab scrolls off of their screen. I realize that they can right click on the left/right tabbing arrows to see a list of all worksheet names, but it would be nice if the INDEX worksheet tab never rolled off of the horizontal tab scroll bar.
View Replies!
View Related
Interpolation Given A Variable Table Location & Location Of Data Within
I am trying to develop a spreadsheet that will calculate a cost based on a matrix. I am attaching a sample of the calculation created so far. The end result is in cell M13 and is highlighted in yellow. I kind of layed the formula out in a few different cells, so hopefully it would be easy to follow. simplify this process with maybe another formula that I might not be aware of, or maybe show me how to get this done in VB code. I think VB code would be the correct way to go just not sure.
View Replies!
View Related
Save As Macro (macro That Opens The Save As Window)
I'm trying to have a macro that opens the save as window, places the name in cell f5 and then allows you to save the workbook with cell f5 as the filename. I have managed to get the save as window to come up and the cell f5 as the name, but when I press save is doesn't. Here is what I have (also, is there a way to direct this to a specific folder).
View Replies!
View Related
Save As Specific Name Plus Todays Date
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 Replies!
View Related
Save As Macro :: Save File To Folder
I have a macro that copy one sheet of the Active workbook and sends it via email. I need to add a code in this sheet so when one opens it from the email, with a command button to be able to save the file to specific, fixed folder on the local network with it’s original file name.
View Replies!
View Related
Save Export Specific Worksheet Error
I am trying to run a macro that will export the 'Results' WS & ask the user where he/she wants the .xls to be saved, though when I click 'Save' nothing happens. In additons in the save as part it has the WB's name(and full extention) is there a way to make this blank or to have something in it? I.e the WS's name?
View Replies!
View Related
Extract Each Sheet To Text File & Save As Sheet Name .txt`
provide me a code for extracting data and outputting it into individual worksheets situated within the excel workbook file. I am wondering what the code would be if the data were extracted to individual text files, individual workbooks or *.prn files? For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row Set ws = Worksheets.Add(After:=Worksheets(Worksheets.Count)) ws.Name = wsraw.Cells(i, "D") With ws .Range("A1") = wsraw.Cells(i, "D") .Range("A2").Resize(2) = wsraw.Cells(i, "A") .Range("B2").Resize(2) = wsraw.Cells(i, "B") .Range("C2") = 0 .Range("C3") = 1000 .Range("A4") = -999 End With Next
View Replies!
View Related
Macro To "go To" Specific Cell In A Different Sheet
I have a seriew of drop-down combon boxes that ultimately "drill-down" to a resulting sheet & cell reference in cell F7. Based on the criteria selected in these drop-downs the resulting sheet & cell reference (cell F7) will change. I am looking for help with a macro that, when run, will take me to the sheet & cell referenced in cell F7. When I do a goto function it always remember the last place I went to and never goes to the latest data in cell F7.
View Replies!
View Related
Save As Filename From Cell & In Specific Folder
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. Sub SaveAsCell() ActiveWorkbook.Save Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Cat Nos").Visible = True Sheets("Supplier Info").Visible = True Sheets("Codes").Visible = True Sheets("Buyers").Visible = True.................................
View Replies!
View Related
Save Workbook With Current File Name To Specific Folder
I recorded a macro to save a workbook to a specific folder using the current file name. However, I've tried to remove the absolute reference to a specific filename but it is not working for me. Am I close? ActiveWorkbook.SaveAs Filename:= _ "H:Files and DocumentsPROJECTSSR 2 SS Phase Two Component ReliabilityWinTrac Files xt_conversionsexcel_version" & SheetName _ , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
View Replies!
View Related
Open Network Location Macro
In my macro I need to open to paths. the 1st path I I have working. Here is the Dim OpenA As Workbook, OpenB As Workbook Dim TheFile As String Dim TheFile2 As String ChDrive "H:" ChDir "H:Treasury Project" TheFile = Application. GetOpenFilename("Excel Files (*.xls), *.xls", , "Select the file and choose open.") If TheFile = "False" Then Exit Sub End If ............... The "????" are where I don't know what to do. I used a test path to make sure all code works and it does, but the real path is a network location. When I go to it manually with excel this is where it shows me to have gone: My Net Work Places, Entire Network, Microsoft Windows Network, Company2, datawhse, root, LAW81, Lawson, Print, Name. If I open a file and do =cell("filename") it gives me \datawhse ootLAW81LAWSONprintNameanrvwfins111thSSFRPMOEDTL.csv. Is it possible to get excel to open me up to ...\datawhse ootLAW81LAWSONprintName.
View Replies!
View Related
Change Macro From Static To Relative Location
I have a file that has 114 rows of data. One for each office I'm working with. I need to insert 6 rows in between each of those rows and type text into some of the fields. I recorded a macro (since I don't know how to write one), but it uses a static location for the rows and data, as opposed to a relative location. So, what happens is, I get the same data entered over and over again. Also, even if I get this to work right with a relative location, I still would have to run it 114 times. I'd like to create one macro that would do the entire document. Here's what I've recorded: .....
View Replies!
View Related
Macro To Save, Save As With Sequential Name
My spreadsheet has 32 worksheets, I've recorded a macro to do the job "save, save as with specific name", but what I want is, when save as, I wanted the file name increase in one number, and the date in a specific range "H8:J8" the date should be the next saturday. here is part of the code. Range("D11:J65").Select Selection.ClearContents Range("J44").Select Sheets("NsFri").Select ActiveWindow.SmallScroll Down:=-12 Range("A12:A21,D12:I21").Select on this example I want the file saved as "PrA4W05.xls", being the next week "PrA4W06.xls", and so on. and on "H8:J8" the next saturday.
View Replies!
View Related
That Takes From Manual Sheet The Number In Specific Column And Multiply It By The Percentage In Sheet
I'm trying to create a formula that takes from "Manual" Sheet the number from colume G2 and multiply it by the percentage in sheet "AllocationRule". My formula currently is =Manual!$G$2*AllocationRule!$B5. What needs to happen is that the total number in "Manual" needs to be distributed evenly in 4 rows by the percentages allocated in "AllocationRule". Right now I can't copy my formula over to the sheet because the "AllocationRule" should stop at B5 and not go further and the G2 from "Manual" should not change for the percentage allocation but should change to the next row for the next month. And then after I've done the calculation I want the LOB in "AllocationRule" to be displayed in the LOB in "H1913_H1914" but I'm not sure what formula to use.
View Replies!
View Related
|