View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
exceluserforeman exceluserforeman is offline
external usenet poster
 
Posts: 45
Default Applying data label in VB



"The best results come from within." A. Non

l
"Barb Reinhardt" wrote:

Figured it out. Thanks anyway!

"Barb Reinhardt" wrote in message
...
I've got this snippet now:

With .Points(idxPt)
If Len(label) < 0 Then
.HasDataLabel = True
.DataLabel.Text = label
Else
.HasDataLabel = True
.DataLabel.Text = ""
End If
End With


If Fail = 1 Then
With .Points(idxPt)
.MarkerBackgroundColorIndex = 3
.MarkerForegroundColorIndex = 3
.MarkerStyle = xlSquare
.MarkerSize = 7
.ApplyDataLabels Type:=xlDataLabelsShowLabel, _
AutoText:=True, LegendKey:=False
End With
Else

With .Points(idxPt)
.MarkerBackgroundColorIndex = 2
.MarkerForegroundColorIndex = 5
.MarkerStyle = xlSquare
.MarkerSize = 7
End With
End If

I'm getting the X axis label displayed as the label and I need to know how
to get it to display the value defined by "label".

"Barb Reinhardt" wrote in message
...
I believe I've defined some data labels, but need to know how to apply
them to a particular point. Any suggestions. I've not found anything
that I can decipher with a Google Search.

I'd like to apply a data label to the point plotted with this.

With .Points(idxPt)
.MarkerBackgroundColorIndex = 3
.MarkerForegroundColorIndex = 3
.MarkerStyle = xlSquare
.MarkerSize = 7
End With

Also, I need to know how to center the data label above and below the
point (need two different methods).

Thanks,
Barb Reinhardt