+ Reply to Thread
Results 1 to 2 of 2

Macros for graph formatting

  1. #1
    Registered User
    Join Date
    05-02-2006
    Posts
    8

    Macros for graph formatting

    Hi,

    I am generating a bar graph that projects future values for years 2007-2011. I want the future value bars to be shaded 75%. I tried to record a macro to do this (basically record macro-> select individual bar -> right click -> etc etc to change the bar shading to 75%). But I can't seem to get this to work. Maybe it's a relative reference problem? Any help would be appreciated. Is what I'm trying to do even possible with macros?

    Thanks!

  2. #2
    Jon Peltier
    Guest

    Re: Macros for graph formatting

    Is this what you were trying to get:

    ActiveChart.SeriesCollection(1).Points(3).Select
    With Selection.Border
    .Weight = xlThin
    .LineStyle = xlAutomatic
    End With
    Selection.Shadow = False
    Selection.InvertIfNegative = False
    Selection.Fill.Patterned Pattern:=msoPattern75Percent
    With Selection
    .Fill.Visible = True
    .Fill.ForeColor.SchemeColor = 17
    .Fill.BackColor.SchemeColor = 2
    End With

    Of course, you wouldn't use the code like above. This is streamlined by
    leaving out the select/selection and the defaults:

    With ActiveChart.SeriesCollection(1).Points(3)
    With .Fill
    .Patterned Pattern:=msoPattern75Percent
    .Visible = True
    .ForeColor.SchemeColor = 17
    .BackColor.SchemeColor = 2
    End With
    End With

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com/
    _______


    "Weissme" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I am generating a bar graph that projects future values for years
    > 2007-2011. I want the future value bars to be shaded 75%. I tried to
    > record a macro to do this (basically record macro-> select individual
    > bar -> right click -> etc etc to change the bar shading to 75%). But I
    > can't seem to get this to work. Maybe it's a relative reference
    > problem? Any help would be appreciated. Is what I'm trying to do even
    > possible with macros?
    >
    > Thanks!
    >
    >
    > --
    > Weissme
    > ------------------------------------------------------------------------
    > Weissme's Profile:
    > http://www.excelforum.com/member.php...o&userid=34044
    > View this thread: http://www.excelforum.com/showthread...hreadid=538051
    >




+ 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