Showing SeriesCollecion as a Spot with value

  • Thread starter Thread starter Sugith Kumar
  • Start date Start date
S

Sugith Kumar

Hi,

Through a VB Program, I need to show the SeriesCollection
as a dot with its value (no columns or continuous lines).
How do I accomplish this?

Would appreciate an early reply.

Thanks
Sugith
 
Sugith,

Turn on the macro recorder.
Select the column or line.
Click the Format menu
Select "Selected Data Series"
Set the Line to None
(If you want the dot, than you need to use a line chart.)
Set Data Label to Show Value
Turn off the recorder.

Now edit the macro.
 
Turn on the macro recorder and see if you can make the changes manually that
will give you want you want. If so, then the recorded code should give you
the general syntax.
 
Thanks Tom/Steve for the reply.
But how do we do this thru VB code? Any examples?

Thanks
Sugith
 
Sugith,

Here is some code that I got using the macro recorder. Below it is a more
streamlined code made by eliminating code lines not neeed.

=================================================
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/22/2003 by Sbell
'

'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
With Selection
.MarkerBackgroundColorIndex = xlAutomatic
.MarkerForegroundColorIndex = xlAutomatic
.MarkerStyle = xlAutomatic
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
ActiveChart.SeriesCollection(1).ApplyDataLabels
Type:=xlDataLabelsShowValue, _
AutoText:=True, LegendKey:=False
End Sub
=============================================
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/22/2003 by Sbell
'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Select
With Selection.Border
.LineStyle = xlNone
End With
ActiveChart.SeriesCollection(1).ApplyDataLabels
Type:=xlDataLabelsShowValue, _
AutoText:=True, LegendKey:=False
End Sub
===============================================
 
Back
Top