Results 1 to 8 of 8

invert if negative chart issue

Threaded View

  1. #1
    Registered User
    Join Date
    06-29-2010
    Location
    Brisbane
    MS-Off Ver
    Excel 2003
    Posts
    37

    invert if negative chart issue

    Hi I am using these steps
    http://www.andypope.info/charts/Invertneg.htm
    to fill color if negative for my bar graph. But it works only when sheet is active. When when I close that excel workbook and open again. color of bar chart change automatically from red and green to blue and white. I could not figure out why color change automatically whenever I open my sheet again. I was trying to call following sub when sheet become active but that give error 1004 in line 2. I was trying to assign macro to chart. But that works only if I select chart. Is there any solution
    'Formating of Financial saving based on current production level
    Public Sub ColorBar()
        ActiveSheet.ChartObjects("Chart 64").Activate ' error here
        ActiveChart.SeriesCollection(1).Select
        Selection.InvertIfNegative = True
        Selection.Fill.Patterned Pattern:=msoPattern5Percent
        With Selection
            .Fill.ForeColor.SchemeColor = 43
            .Fill.BackColor.SchemeColor = 3
        End With
        With Selection.Interior
            .ColorIndex = 3
            .PatternColorIndex = 43
            .Pattern = xlSolid
        End With
    End Sub
    http://www.mrexcel.com/forum/showthr...63#post2392363
    Last edited by MeenuSaini; 07-29-2010 at 08:46 AM.

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