Consulting

Results 1 to 4 of 4

Thread: How to delete external links excel 2007

  1. #1

    How to delete external links excel 2007

    i have a workbook with 25 sheets, and each sheet has hundreds of formulas,
    i tried the flowing code, but is is running forever,
    i any other way,

    [VBA]Sub Remove_External_Links_in_Cells()

    Dim LinkCell
    Dim FormulaCells As Range
    Dim SheetsInWorkbook As Object

    For Each SheetsInWorkbook In Sheets
    SheetsInWorkbook.Activate
    'Error trapping if no formulacells found
    On Error Resume Next
    'Select only formula cells
    Set FormulaCells = Cells.SpecialCells(xlFormulas)
    'Loop every formulacell in sheet
    For Each LinkCell In FormulaCells
    'If you want paste linked value as "normal value"
    If InStr(1, LinkCell.Value, ".xls]") = 0 Then
    LinkCell.Value = LinkCell
    End If
    Next
    Next
    End Sub[/VBA]

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,119
    Location
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    Thank you very much for your help, i will try it and see how it works,
    i appreciate your help

  4. #4
    Hi , look , i run the above code (thank you), but still when i try to save my workbook as Excel Macro_Enabled Template, it giving me the flowing message :

    This workbook contains external data.


    how can delete this external data? where i can find these external data and delete them. ?

    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •