+ Reply to Thread
Results 1 to 2 of 2

referencing lines and series points

  1. #1
    Registered User
    Join Date
    11-14-2004
    Location
    Georgia
    Posts
    57

    referencing lines and series points

    what is the VBA code for referencing to individual points in a line on a line graph? i would like to create a macro to change indiviual points' shapes and the color or the lines in between them to different colors depending on different parameters. is this possible?
    Brought to you by Pringles and his infinite genius. ~''~

    "Ctrl+Z is a beautiful thing."
    - Me.

  2. #2
    Andy Pope
    Guest

    Re: referencing lines and series points

    Hi,

    The Macro Recorder is useful for tasks like this. Giving you an insight
    into the objects and properties needed.

    Sub Macro2()
    '
    ' change the line between points and 4 to red
    '
    ActiveChart.SeriesCollection(1).Select
    ActiveChart.SeriesCollection(1).Points(4).Select
    With Selection.Border
    .ColorIndex = 3
    .Weight = xlThin
    .LineStyle = xlContinuous
    End With
    '
    ' change marker to red circle black border size 10
    '
    With Selection
    .MarkerBackgroundColorIndex = 3
    .MarkerForegroundColorIndex = 1
    .MarkerStyle = xlCircle
    .MarkerSize = 10
    .Shadow = False
    End With
    ActiveChart.PlotArea.Select
    End Sub


    Cheers
    Andy

    medicenpringles wrote:
    > what is the VBA code for referencing to individual points in a line on a
    > line graph? i would like to create a macro to change indiviual points'
    > shapes and the color or the lines in between them to different colors
    > depending on different parameters. is this possible?
    >
    >


    --

    Andy Pope, Microsoft MVP - Excel
    http://www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1