Consulting

Results 1 to 2 of 2

Thread: Chart Series Selected Index

  1. #1

    Chart Series Selected Index

    Hi All,

    How to get the selected series index number of a chart?

    Thanks for the help,

    Rgds,
    Balumail75.

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    two ways you can check out and test:[VBA]Sub dlah()
    If TypeName(Selection) = "Series" Then
    Set ch = ActiveChart.SeriesCollection
    For I = 1 To ch.Count
    If ch(I).Name = Selection.Name Then MsgBox "index is " & I
    Next I

    'also:
    aa = Selection.Formula
    bb = Mid(aa, InStrRev(aa, ",") + 1)
    MsgBox "also, index is " & Left(bb, Len(bb) - 1)
    End If
    End Sub
    [/VBA]
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

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