ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   labels for bubble charts (https://www.excelbanter.com/charts-charting-excel/86212-labels-bubble-charts.html)

RickSubber

labels for bubble charts
 
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

Jon Peltier

labels for bubble charts
 
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 "Select a chart and try again.", vbExclamation, "No Chart
Selected"
End If
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


"RickSubber" wrote in message
...
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




RickSubber

labels for bubble charts
 
Jon, thanks much, you're a genius, this works just fine!..........rick



"Jon Peltier" wrote:

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 "Select a chart and try again.", vbExclamation, "No Chart
Selected"
End If
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


"RickSubber" wrote in message
...
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






All times are GMT +1. The time now is 02:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com