View Single Post
  #1   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

hi,

i wrote a macro constructing a chart, where all data series and data labels
of the series were shown and formatted in a certain way. this part was
working perfectly; the next step is to search all series, which have a
certain data label name (in this case "Interim" and to reformat them. The
problem is that I don't know how to put the query into vba, so that it works
correctly.

My first approach was to make a loop stepping through each series and to
insert an if-statement searching for the certain name:

IF ActiveChart.SeriesCollection(xxx).DataLabels.Name = "Interim" THEN

etc.

Seems that VBA cannot work with an if-statement like that. Do you have any
proposals?