Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jun 2004
    Thanked 0 Times in 0 Posts

    Determining the Active Series in a Chart (10)

    Is it possible to determine if a series in a chart is active within code. There does not seem to be a way to determine which series was selected if all I wanted to do was manipulate one in the collection.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Determining the Active Series in a Chart (10)

    If you just want to apply code to the selected series, apply it to the Selection object. To determine whether the selection is a series, and if so, which one (if you really need to know), you could use code like this:

    Dim i As Integer
    If TypeName(Selection) = "Series" Then
    For i = 1 To ActiveChart.SeriesCollection.Count
    If Selection.Name = ActiveChart.SeriesCollection(i).Name Then
    MsgBox "You selected series # " & i
    Exit For
    End If
    Next i
    MsgBox "No series selected."
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts