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 Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
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
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
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
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 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
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
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
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
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
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 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 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
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
Minus Number From Cell And Result In Specific Cell And Specific Column
I have number in cell (A1) = 100. when I enter number in any cell of column(B) for example (B1)=10. then in cell (C1) the result of (A1) - (B1) = (90) and if I add in cell (B2)=10 then in cell (C1) the result of (A1) - (B1+B2) = 80 .accumulatively in cell (C1). and any number in column (B), the result will be (A1) minus any number in column(B) accumulated in (C1) second question I have number in cell (A1) = 100. when I enter number at cell (B1) = 10 then the result would be in the adjacent cell (C1) = (A1) - ( B1) = 90 and If I enter a new number in cell (B2) = 10 then the result would be in the adjacent cell (C2) = (A1) - (B1+B2) = 80 and If I enter a new number in cell (B3) = 10 then the result would be in the adjacent cell (C3) = (A1) - (B1+B2+B3) = 70 and so on. I want the result to be add automatically to adjacent cell in column (C)
View Replies!
View Related
Search Arrays For Specific Values And Copy "associated" Values To A New Location
Given the following data located in Sheet1 of a Workbook - •I have seven columns (assume header row names are “A, B, C, D, E, F, G”) each containing numeric data in random order. •All columns are of the same length (equal number of rows), followed by a blank cell, but the number of rows is unknown. •Columns with header row names A-E will only contain numbers from 0 to 100, while F and G may contain numbers from -127 to +128. Here is what I would like to do – I would like to be able to analyze the data in columns A-D to locate rows that contain specific combinations of values (ex. row 41 contains the values 50, 0, 0, 0 and row 239 contains values 100, 0, 0, 0 in columns A – D, respectively, etc.). For each row that is found to contain one of these combinations (there are many different combinations required), I would like to copy the associated values from columns E, F, & G for that row, and paste them into their respective (E, F, & G) columns located on Sheet2 of the same workbook. However, I would like to paste the E, F, & G values into a specific row order on Sheet2, DETERMINED by the value of the A – D combination identified on Sheet1. Continuing with the ex. above, let’s say I would like to have the EFG values from row 239 in Sheet1 copied to row 10 in Sheet2, while the EFG values from row 41, Sheet1, are to be copied to row 11 in Sheet2. In effect, I would like to create a table of this subset of data, in a specific order, from which I could work later. I can do this manually using “ AutoFilter” to locate the data I need and then write formulas to copy the data from Sheet1 to Sheet2 in the order that I need, but every time the order of the original data on Sheet1 changes I have to start all over.
View Replies!
View Related
Finding The Location Of A Cell
i am trying to find the location of the current cell and use the information to print it to screen. For example, if the cell A1 is selected, i need to get the location A1 and use this value for a vlookup. is there a method that returns the current cell location "A1"?? activecell.address
View Replies!
View Related
Increment Cell Location Up By One Cell For A Column
Increment all cells located in Column H up by one (the one above it) cell Except for the header cell (since its the header)(H1), H2 will always be a blank due to the make up of my database so that will not cause the header to be re-written. Column H is not an entirely filled column and some cells are empty (if this info was needed in optimizing the code), Im seeking the quickest and easiest way of implementing this since the database is very large.
View Replies!
View Related
Move/Cut Cell To Another Location
I would like to how I can move the words "Total List Price" over to column "C" rather than have it displayed in column "A". If someone can please advise me as to what part of the code I must change in order to have these changes take place Private Sub CommandButton1_Click() Selection.SpecialCells(xlCellTypeFormulas, 16).Select Selection.ClearContents Range("A8").Select Selection. Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(6, 9), _ Replace:=False, PageBreaks:=False, SummaryBelowData:=True Application.Goto Reference:="models2" ....................
View Replies!
View Related
Formula To Calculate Cell Location
i'm not sure how to describe this. i've never had to do this before. here is what i'm trying to do. and it's not working. =MIN(B2:B(G2-G3)) basically instead of saying =MIN(B2:Bx)....i want the "x" to be variable based upong the G2-G3 condition. can this be done some other way?
View Replies!
View Related
Store Cell Location In Variable
way to store a cell's location to variables. Something like: int a, b Cell(a, b) = ActiveCell I'm currently working with a fairly large worksheet, and I'm using Cells. Find to look for a specific cell. Then I want to Filter that column, but I can't figure out what column Selection.AutoFilter Field:=? should be.
View Replies!
View Related
Cell Value Based On Mouse Location
Is there a way to have excel track where my mouse is hovering(say if I have it hovering over cell A4) and have it return the value of A4 in a different cell (e.g B7)? This would occur in real time - that is, as my mouse moved over the spreadsheet, B7 would update in real time. Note I would also accept someone selecting the cell - hovering (no select) would be ideal but selecting is OK.
View Replies!
View Related
Copy Cell Values While Id Value Is Same To New Location Then Repeat For New Id Value
what I need to do is , while an id value is constant copy 2 adjacent cells to a new location on the same row as the first occourance of the id value, then if the id is the same on the next row repeat the copy and add these 2 values to the cells next to the ones previously copied. Once the Id value changes then the copy restarts on a new row which is the same as the first occourance as the new id value and repeats the same sequence as described in the first statement. I have attached a sample spreadsheet showing an example of the source and how I would like it to end up, the colour is only there to seperate the outcome from the source and is not required in the code.
View Replies!
View Related
Find MIN Location, Show Cell Next To It
I imagine this is pretty simple but for the life of me I can't figure it out. Here's what I want to do... Find MIN in Column F After finding the MIN in F (let's pretend F222 is the current min) Show the text in the field next to it (in this case display text from E222)
View Replies!
View Related
Creating Variables Based On Cell Location
if Row i Column j is activated then a corresponding variable Aij, Bij, Cij or Dij would be created (if not already existing), or cumulated by 1. The problem as I see it - completely generalised - is to create a variable where the variable name itself is formulaic, as well as its value. I know SAS would have no problem with this due to the order in which it parses data steps, but I'm pretty amateur with other programming languages so I don't know if this is blindingly obvious or downright impossible!
View Replies!
View Related
Add Position Shape To Cell Location
i need to loop through a column of values and get each value Dim LastRow2 As Long Windows("SCFOutput.xlsm").Activate Sheets("Q2SCNeg").Select Columns("A:B").Select ActiveSheet. Range("A65536").End(xlUp).Offset(1, 0).Select LastRow2 = ActiveCell.Row - 1 For Each c In Worksheets("Q2SCNeg").Range("A2:A" & LastRow2).Cells MsgBox ActiveCell.Value Next c i did this but it selects the first blank row (row 15) and gives me an empty message box 14 times (which is right, but i need 14 values) the reason i need the loop is because the number ov values will always change
View Replies!
View Related
Return Active Cell's Location/row
I'm having trouble identifing a way to return a location for the position of the active cell. I've searched Excel help with "Position, location, return, activecell, etc." and I can't seem to figure this out. I know that it's possible, so that's why I'm on here! ... Ok, say the active cell is currently "F1", and I need the location "F1" to identify the ROW to be used in a formula later, how would I go about that? The current contents of cell "F1"' will be "REPLACE", but I need to change the words "REPLACE" in "F1" and other cells labeled "REPLACE" in column F to the following formula (where the "1" in "A1" is is the current row):
View Replies!
View Related
Search Multiple Columns To Provide Cell Location
I have text (eg. 1-* or 10-* or 11-*) being entered in the following columns Q21:Q128 R21:R128 V21:V128 W21:W128 AA21:AA128 AB21:AB128 AF21:AF128 AG21:AG128 AK21:AK128 AL21:AL128 AP21:AP128 AQ21:AQ128 AU21:AU128 AV21:AV128 AZ21:AZ128 BA21:BA128 BE21:BE128 BF21:BF128 BJ21:BJ128 BK21:BK128 I would like Excel to search the above columns provide the cell location (eg. 1-10-*) is located in cell BF26
View Replies!
View Related
Select A Range Based On Active Cell Location?
I'm trying to select a range of cells whereby the range is dependent on the currently active cell. I know you can use the "Activesheet.Range("A1:D2").select" method to select a range where the cells are always the same, but I'm after a dynamic selection where the values can be programmatically altered depending on some other result. For example, let's say that I make a certain cell active (based on the result of some other formula), and I want to select the range of cells in the adjacent column that is X rows deep. Putting this into context, imagine the resultant active cell is B2, I then want to select the range C2:C10, but if the active cell is E10, the range selected would be F10:F18 (if active cell is X, then range would be Y:Z). The Offset function would allow me to position the cell based on the current active one, but it doesn't let me select a range. The Range function only lets you choose either hard coded or index cells, e.g. "Range(cells(y,z), cells(y,z)).select", but this is still no good because I'd need to know the index value of the active cell (can this be done?).
View Replies!
View Related
Browse For Picture File And Put Location In Cell
I am trying to code where when someone hits the command button it will popup with the browse form and they find the location of the file and it puts there choice in a cell. don't know if it matters but the location would always be a picture. Here is what I have but it shows -1 in the cell HTML Dim strFilePath As Variant strFilePath = Application.FileDialog(msoFileDialogFolderPicker).Show shUserInformation.Range("D12").Value = strFilePath
View Replies!
View Related
Circular Reference - Value Of That Variable Changes Depending On The Location Of The Cell
Excel 2003 > Attached is a small model of what I am trying to accomplish. Cells B2 and B4 contain the same formula … a formula that calls a simple function. The function has a variable passed to it … and the value of that variable changes depending on the location of the cell. Now, see the function in Module1 … it is called CellCalc. If the variable passed = Jim then value = 3. If the variable passed = Jack then value = 8. That is straightforward. Note also that when Sheet1 is activated, I calculate the cells from left to right and top to bottom … that is important. Here is the challenge. If B2 > 1 then I want to add B2 to B4 and set B2 to 1. I can set B4 properly but I cannot reset B2. You can see my 2 attempts that are commented out. Is there some way of accomplishing this … or am I simply stuck in a circular reference? The alternative to this is to write a function that operates externally on these cells. That will work for sure but then the values of the calculations will overwrite the functions in those cells, thereby taking away the dynamic nature of this application.
View Replies!
View Related
|