title: remove external links in excel diagramm
body: <p>I have copied a whole table sheet from one excel document to another.
  The diagramm in that sheet was copied as well.</p>
  
  <p>However the data in the diagramm refers to the other excel document and not to the current sheet.</p>
  
  <p>That means that the link does look like</p>
  
  <pre><code>'C:\LokaleBilder\[P3-20x]Tabelle1'!$B$3:$B$403
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>'20x-(Kreuz)'!$B$3:$B$403
  </code></pre>
  
  <p>Note that the sheet name has changed too.</p>
  
  <p>If this was fixable with some vba code I would like to know how.</p>
  
  <p>EDIT:</p>
  
  <p>Note that these are not hyperlinks, its links do documents.</p>
  
  <p>I tried to work on it by removing the document string. that fails however:</p>
  
  <pre><code>Dim currSheet As String
  currSheet = ActiveSheet.Name
  
  ActiveSheet.ChartObjects("Diagramm 1").Activate
  
  Dim xSer As Series
  Dim xvalueStr As String
  Dim valueStr As String
  Dim m As Integer
  For m = 1 To ActiveChart.SeriesCollection.Count
      xvalueStr = ActiveChart.SeriesCollection(m).XValues
  </code></pre>
  
  <p>with </p>
  
  <blockquote>
    <p>data types do not match </p>
  </blockquote>
  
  <p>in the last line</p>
  
  <p>Edit2:
  I could find out that xvalues is of datatype <code>Range</code>. I could however not find out how to modify this Range datatype.</p>