close

I have successfully used the macro described in KB213750 to create labels for
my bubble charts.
Is there a macro to REMOVE these labels from a bubble chart.......that is, a
macro to undo the label macro?
Thanks
Rick

Do you need a macro? You can just click on a label and press Delete.

To remove data labels from an active chart:

Sub DeleteLabels()
Dim srs As Series

If Not ActiveChart Is Nothing Then
With ActiveChart
For Each srs In .SeriesCollection
If srs.HasDataLabels Then
srs.DataLabels.Delete
End If
Next
End With
Else
MsgBox quot;Select a chart and try again.quot;, vbExclamation, quot;No Chart
Selectedquot;
End If
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
PeltierTech.com/
_______quot;RickSubberquot; gt; wrote in message
news
gt;I have successfully used the macro described in KB213750 to create labels
gt;for
gt; my bubble charts.
gt; Is there a macro to REMOVE these labels from a bubble chart.......that is,
gt; a
gt; macro to undo the label macro?
gt; Thanks
gt; Rick
Jon, thanks much, you're a genius, this works just fine!..........rick
quot;Jon Peltierquot; wrote:

gt; Do you need a macro? You can just click on a label and press Delete.
gt;
gt; To remove data labels from an active chart:
gt;
gt; Sub DeleteLabels()
gt; Dim srs As Series
gt;
gt; If Not ActiveChart Is Nothing Then
gt; With ActiveChart
gt; For Each srs In .SeriesCollection
gt; If srs.HasDataLabels Then
gt; srs.DataLabels.Delete
gt; End If
gt; Next
gt; End With
gt; Else
gt; MsgBox quot;Select a chart and try again.quot;, vbExclamation, quot;No Chart
gt; Selectedquot;
gt; End If
gt; End Sub
gt;
gt; - Jon
gt; -------
gt; Jon Peltier, Microsoft Excel MVP
gt; Peltier Technical Services
gt; Tutorials and Custom Solutions
gt; PeltierTech.com/
gt; _______
gt;
gt;
gt; quot;RickSubberquot; gt; wrote in message
gt; news
gt; gt;I have successfully used the macro described in KB213750 to create labels
gt; gt;for
gt; gt; my bubble charts.
gt; gt; Is there a macro to REMOVE these labels from a bubble chart.......that is,
gt; gt; a
gt; gt; macro to undo the label macro?
gt; gt; Thanks
gt; gt; Rick
gt;
gt;
gt;

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()