Hi Everyone,
I've posted this question on some Excel newsgroups and websites and haven't had that much luck. So, this is my final shot before I totally give up. I have a excel spreadsheet with 7 small charts on it. They all link to a separate spreadsheet that has data on it. I want to place the spreadsheet with the 7 small charts on a server so my co-workers can access it. But, a message appears
asking if I want to update the links. Does anyone have any ideas on how to
get rid of these links?
I've tries this code from a excel website (http://www.geocities.com/jonpeltier/Excel/Charts/DelinkChartData.html) but keep on coming up with "run-time error '1004'. Unable to set the XValues property of the Series Class":
Sub DelinkChartFromData()
''' Thanks to Tushar Mehta
Dim mySeries As Series
Dim sChtName As String
''' Make sure a chart is selected
On Error Resume Next
sChtName = ActiveChart.Name
If Err.Number <> 0 Then
MsgBox "This functionality is available only for charts " _
& "or chart objects"
Exit Sub
End If
If TypeName(Selection) = "ChartObject" Then
ActiveSheet.ChartObjects(Selection.Name).Activate
End If
On Error GoTo 0
''' Loop through all series in active chart
For Each mySeries In ActiveChart.SeriesCollection
'''' Convert X and Y Values to arrays of values
mySeries.XValues = mySeries.XValues
mySeries.Values = mySeries.Values
Next mySeries
End Sub
If anyone has any idea on how to do this or any other suggestion, please let me know.
Thanks
Lou K
I've posted this question on some Excel newsgroups and websites and haven't had that much luck. So, this is my final shot before I totally give up. I have a excel spreadsheet with 7 small charts on it. They all link to a separate spreadsheet that has data on it. I want to place the spreadsheet with the 7 small charts on a server so my co-workers can access it. But, a message appears
asking if I want to update the links. Does anyone have any ideas on how to
get rid of these links?
I've tries this code from a excel website (http://www.geocities.com/jonpeltier/Excel/Charts/DelinkChartData.html) but keep on coming up with "run-time error '1004'. Unable to set the XValues property of the Series Class":
Sub DelinkChartFromData()
''' Thanks to Tushar Mehta
Dim mySeries As Series
Dim sChtName As String
''' Make sure a chart is selected
On Error Resume Next
sChtName = ActiveChart.Name
If Err.Number <> 0 Then
MsgBox "This functionality is available only for charts " _
& "or chart objects"
Exit Sub
End If
If TypeName(Selection) = "ChartObject" Then
ActiveSheet.ChartObjects(Selection.Name).Activate
End If
On Error GoTo 0
''' Loop through all series in active chart
For Each mySeries In ActiveChart.SeriesCollection
'''' Convert X and Y Values to arrays of values
mySeries.XValues = mySeries.XValues
mySeries.Values = mySeries.Values
Next mySeries
End Sub
If anyone has any idea on how to do this or any other suggestion, please let me know.
Thanks
Lou K