Last week I copied a worksheet from one spreadsheet into another, and have since been working from the new one. When I open the file I get a message box asking if I want to Update links from the other workbook. But I've deleted all named ranges, formulae, shapes, everything that could possibly link to the other workbook. I've also (in my frustration) completely deleted the sheet that was originally copied and re-made it from scratch. But it STILL comes up with this update box. In Excel's Help it says to go to Edit/Links and press Break Link, which I have tried but it doesn't do a thing. The link is still sitting there in the display box in the Links window - it says that the Type is Worksheet, I don't know if this makes any difference that it's not a formula or anything?
Also, in complete desperation when it wasn't deleting the link, I changed the source to a random file, so it now comes up with an error in updating (which it obviously would) however this doesn't have any effect on my file because as far as I can tell it no longer has links to the other file! I'm tempted to just go to the option that says don't show the Update prompt on opening (the file is to be handed in as coursework on Wednesday) but this doesn't solve the problem, only bypasses it! Each time I made a major change (e.g. recreating the copied worksheet, changing the source) I saved the file under a different name, so I have all old copies just incase I've completely messed it up!
I copied 2 worksheets from one file to another and went in to "Edit Links" and changed the source to itself rather than the original file which took away those links in the cells that the original file was present in, but it still gives me a dialogue when opening the file that links to the original file. I go back to "Edit Links" and press "Break Link" but it doesn't seem to remove the link to the original file. If I click on "Connections", none are present. I clicked on "Startup Prompt" and set it so that it wouldn't annoy me with the prompt any more, but I'd ideally like to not have any reference to the original file.
I have an unwanted link and I can't remove it. I have tried through the Edit Links dialog box, searched for [ in formulas throughout the workbook and gone searching manually for the reference but to no avail.
I'm looking for syntax to break all links in a workbook using VBA. I've found the below through independent research but I'm receiving a type mismatch error.
Code: Sub BreakLinks() 'Macro Purpose: Break all links in the active workbook Dim vLinks As Variant
I've got a file that is currently linked to two other files. The links are summed in the cell as below:
='[Book1.xls]Funding and Interest'!D$17+'[Book2.xls]Funding and Interest'!D$17...and so on.
I want to get rid of the link to Book1, so I'd zeroed the values in Book1 and my plan was then to Break the links to this, leaving zeros and the links that I want, but because both files are linked in the same cell (the same nested SUM), when I go to Edit, Break Links, it breaks the links to both files, even though I only select one form the list.
Somehwere in a review of your book, it referred to an add-in that attempts to break all links to a workbook. I looked on the site (microsoft) with the provided URL but could not find it. Is it still there? Does it work for EXCEL 2002?
How can I break the link between a chart and a worksheet? If I change the name of the worksheet and try to use the chart I got an error that the current worksheet is the one that the chart is related to. I tried changing the source from the links option in the bar - no effect. I checked conditional formatting - also no effect. How can I break all existing links between the sheet and the macro?
I am new in VBA, but I have a short procedure to break all external links in the currently active workbook.Is there any option to firstly update all external links and only then break them?
Sub BreakLinks() Dim Links As Variant Dim i As Integer With ActiveWorkbook Links = .LinkSources(xlExcelLinks) If Not IsEmpty(Links) Then For i = 1 To UBound(Links)
I have a workbook that archives by date and is saved for 1 month at a time. At the end of the month, all the archived workbooks are moved to another location and are no longer needed.
The problem I am having is I don't know how to break the link between the master and all the saved workbooks. So when I open the master it is looking for the old workbooks in the folder location and they do not exist. How do I break this link?
I'im using an index - match - match formula with links to an external file.
Everything works fine until I close the source workbook. At that moment the liks break. The error I'm getting is #REF!.
I suspect the reason is that the source data are in form of an official table. I tried some formulas with data in the same workbook but outside the table and they keep working after the source file is closed.
I really want to keep the source data in a form of an official excel table.
I have several hundred workbooks which are linked to a master workbook from where the workbooks draw their information. Now I would like to break all the links in all of the several hundred workbooks to this master workbook and retain the information. Is this possible without having to open each workbook individually and break the links via the 'edit links' option?
I'd prefer to edit links with the source workbook open, however I receive this error when I do "A formula in this worksheet contains one or more invalid references." I am able to edit links with the source workbook closed but this takes far too much time to be satisfied with that as the solution. I have used vlookup formulas and the index-match method and they both take about the same amount of time to update. I've separated each worksheet and used the "name manager" add-in and have searched all links for any type of error. I feel like I'm missing something. Is there a way to fix this "invalid reference" error so that I can edit my links with the source workbook open?
The code which you provided works fine no problem for a page break. I need to run the macro for the page break by asking the input file for page break to be done.
For Example, If excel filename "A" contain the code which you have given need to ask to input the filename "B" and process need to be done in file "B".
I have added some code to your code which you provided but it gives error message "1004" "Method 'Range' of object '_Application' failed" at following line :
Set rng = oExcel.Range(Cells(2, 2), Cells(Rows.Count, 2).End(xlUp))
I have attached the file I am working on. I am attempting to create a link to an external file based on the value of cells in column A. Then I would like to simply copy the formula down, lets say in Column B, the rows and as I do the external file reference will change depending on the value within the cell in Column A. I hope that I am making sense.
I am using Windows Vista with Excel 2007. The files will all be within the same file folder, however, there are hundereds of files so I won't be able to open them all for the indirect to work.
I need to set the page break in my excel file. Basically what I need is for vba to check if the page breaks are a certain value (in this case Range("A150"). If they are not, then the code will set them to what I need.
The problem is the code is not working.
Code:
If ActiveSheet.HPageBreaks(3).Location Range("A150") Then Set ActiveSheet.HPageBreaks(3).Location = Range("A150") End If
i'm struggling with a formula to extract the folder names from a file path string i have in col A. I want to take the path value and for each "node" in the path place that string value in cols
Example string: "pathfolder01subfolder2folder level 3level 4 folderanother folder for 5sublevel 06 folder" In my example there are 6 folder levels in the path. I want a formula to "strip out" each level of the path string and put it in a seperate column.
I am unable to print an office file to a certain printer because I am not the author of the file.. when I copy and paste to a new doc I can print no problem.
I was able to open and read this file before installing Windows 8.
The background to this is that after installing Windows 8 and reinstalling Windows University 2010 my word documents and excel files where all opening up as word pad documents. I figured out the solution to the above on my own and I am now able to properly read the excel and word documents that I tested. But I am not able to read a very important excel file. It is very important that I restore somehow this file.
When I open the excel file a dialogue box open up saying "Excel found unreadable content in "Account.xlsx". Do you want to recover the content of this workbook? When I choose Yes the following dialogue box opens up saying "Excel cannot open the file "Account.xlsx" because the file format or file extension is not valid. Verify that the file has not been corrupted and that the extension matches the format of the file".
The file extension is set to xlsx however how do I test to see if it is corrupt. Is there anything I can do to restore this excel workbook?
I am having trouble converting file formats. I would like to convert a.xlsx file to a .xls file. It is password protected and everything I have tried to use to convert the file has failed.
I have a template that I wish to distribute to others. It will link to a second file (also distributed by me) that will be in each users' "My documents" folder (or "Documents" in Vista). I currently have the template set to look at "C:" as that is common for everyone. Turns out that creates other problems. However, now each user's file location will be unique due to the path of their documents folder
Question, is there a robust way to automate the finding of the linked file in the template without having each user "relocate" it? Reason is the template will be updated frequently and I want to ease their pain by not making them go through this every time.
I am facing an issue where my macro is unable to open multiple files and run the macros in it. Below is the code that i am using and it stops at boss1.
I have an Excel worksheet (2007 version) which I am trying to save as a PDF file. However, the PDF option is not listed in my "Save as type" drop down window.
I am working on a research project of which details cannot be disclosed. I basically have many worksheets which each contain 3D positional data and I am plotting overlaid graphs using multiple worksheets. I have gotten them to work where I manually enter the names of the worksheets, but I am trying to use the CELL("filename") command to get the current worksheet's name, then using a substitute command to change certain fields, then I would like to use the string name created by those functions to call a global variable in another worksheet which defines a range. I will try to give an example.
Say I have 3 worksheets for arbitrary measurements: 1) filename 1mm 2) filename 2mm 3) filename 3mm
I would like to graph all 3 sets of data in worksheet "filename 1mm", using the fact that everything in the filenames are the same except for the 1/2/3mm part. I have a template of which I will be copy/pasting data from numerous data sets and then each worksheet has defined names "X_vals" and "Y_vals" which give me dynamic ranges for the data I wish to plot from that worksheet.
When I type the names manually--i.e. " 'filename 2mm'!X_vals" everything works fine, but when I try to create the exact same string dynamically using indirect/substitute/left/right etc, it does not let me do it. I am able to create a dynamic string with a range, such as " 'filename 2mm'!C10:C100" but then when I change it to " 'filename 2mm!X_vals" it just gives me #REF!.
I guess my question is just is there any way to use the indirect function to create a string name dynamically which references a defined name in another worksheet? If not possible with just simple excel functions, is there a way to do this with a macro? I am not exactly familiar with VBA in excel, though I know how to run macros.
I have a workbook that links to four files. I would like to automatically update the links when the file is opened and if the linked files are not available, don't display a message.
I got the first part done using the Options menu in Excel but can't figure out how to suppress the message when the linked files are not available
I've recorded a Get External Data macro and wish to modify source and destination components. I would like to replace the absolute link to the file name with a variable and the Destination range to the active cell at the time I run the macro.
This is the is the macro code line that handles the source and destination components I want to modify.
Range("AQ2").Select With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:filename.csv", Destination:=Range("AQ2"))
The master has rows corresponding to numbered files: 4300 | CellValue1 | CellValue2 | etc 4301 | CellValue1 | CellValue2 | etc
In attempting a simple formula (a couple VBA codes I tried did not work and were probably substantially more than I needed anyway), I made the following:
='CMain FolderSub Folder[concatenate(cell w/file number,".xls")]Sheet1'!A1 This is identical to the copy/paste link formula currently in use except that I am trying to have the actual file number/name generated off the master list instead of what is in the file itself.
Purpose: in case I was not clear on this above, I am trying to automatically populate the master worksheet with the data from the workbook. The current procedure is to copy a line of the data from the workbook, then paste as a link in to the master worksheet on the row corresponding to the file number.