View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Kathl Kathl is offline
external usenet poster
 
Posts: 20
Default searching for data labels with specific text

ok 'm posting all of my code so that you don't misunderstand any replies of
others for the code i have implemented:

For num = 2 To 36
If ActiveChart.SeriesCollection(num).DataLabels.Name = "Interim" Then
ActiveChart.SeriesCollection(num).Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlNone
End With
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlNone
End If
Next num

So repeating the problem is that the if-statement never becomes true because
somehow the program doesn't find the Series in the chart that are labelled as
"Interim".

Cheers

"Sandy Mann" wrote:

Unless I am misunderstanding you:

The problem is with the if-statement, because the program loops through
all
the if returns always false.


is not correct, the

exit for


stops the For/Next loop when the first TRUE answer to the If is encountered.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk