Results 1 to 2 of 2

Changing Plot Area color of Chart using VBA

Threaded View

tmac98 Changing Plot Area color of... 04-06-2008, 09:38 PM
Leith Ross Hello tmac98, To make your... 04-06-2008, 11:47 PM
  1. #1
    Registered User
    Join Date
    02-03-2008
    Posts
    12

    Changing Plot Area color of Chart using VBA

    I have 2 charts that are created with a macro. But the defaulting colors are not very good. I have tried to change them using all the basic commands that I have found selecting the active chart, plot area and then color index but it doesn't work. I have my code below. The chart is on sheet 4 but the data is on sheet 1.

    Any suggestions would be great. Thank you

    Tmac

    Dim mychtobj As ChartObject
       
        Set mychtobj = Wks4.ChartObjects.Add _
        (Left:=250, Width:=700, Top:=15, Height:=500)
       With mychtobj.Chart
            .ChartType = xlXYScatterLinesNoMarkers
                 
            With .SeriesCollection.NewSeries
                .Values = Range(Cells(2, 31), Cells(increment, 31))
                .XValues = Range(Cells(2, 33), Cells(increment, 33))
                .Name = "Chromatogram"
            End With
                    
        .Axes(xlCategory).MinimumScale = Wks2.Cells(32, 1)
        .Axes(xlCategory).MaximumScale = Wks2.Cells(33, 1)
        .Axes(xlCategory).MajorUnit = 0.2
        .Axes(xlCategory).MinorUnit = 0.1    
      End With
    Last edited by Leith Ross; 04-06-2008 at 11:46 PM.

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