Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Delink Chart data, Labels and etc 1

Status
Not open for further replies.

xlhelp

Instructor
Dec 7, 2001
2,976
CA
Hello.

One can delink (or unlink) the plotted data in a chart by clicking on the series and then while in the formula bar, press F9 (or CTRL/=) and press Enter to remove links to the cells and leave absolute values in the chart for the particular series.

I am looking for an all encompassing macro to delink series, axes, labels, titles etc. for an auto-dynamic chart I have created.

Please don't go through the trouble of creating one on my account. If you have one, I would love to have it. Being lazy, I am trying to take the easy way out.

Member- AAAA Association Against Acronym Abusers
 



Hi,

For instance for each object value you want to make static...
Code:
Sub test()
    With ActiveSheet.ChartObjects(1).Chart
        .ChartTitle.Text = .ChartTitle.Text
'other go here
    End With
End Sub


Skip,

[glasses] [red][/red]
[tongue]
 
Dang.....so simple.

I bow to you ole Grand Master.

Member- AAAA Association Against Acronym Abusers
 



You can further automate...
Code:
Sub test()
    dim oObj as Object
    On Error Resume Next
    With ActiveSheet.ChartObjects(1).Chart
        .ChartTitle.Text = .ChartTitle.Text
'where there are multiple objects in the chart
        For Each oObj In .Axes
           oObj.AxisTitle.Text = oObj.AxisTitle.Text
        Next
'others go here
    End With
End Sub


Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top