+ Reply to Thread
Results 1 to 3 of 3

VBA for recolouring all series in a chart the same colour

  1. #1
    Registered User
    Join Date
    05-24-2019
    Location
    Glasgow, UK
    MS-Off Ver
    365
    Posts
    4

    VBA for recolouring all series in a chart the same colour

    I would be super grateful if someone with VBA knowledge could give me VBA code for recolouring all series in the active chart to the same RGB colour.

    Edit: Line series with no markers
    Last edited by HanJam; 10-03-2019 at 06:41 AM.

  2. #2
    Registered User
    Join Date
    05-24-2019
    Location
    Glasgow, UK
    MS-Off Ver
    365
    Posts
    4

    Re: VBA for recolouring all series in a chart the same colour

    Courtesy of Andy Pope I managed to do it with the following code:

    Sub recolour()
    Dim objSeries As Series

    With ActiveChart
    For Each objSeries In .SeriesCollection
    With objSeries.Format.Line
    '.Transparency = 0
    '.Weight = 1.5
    .ForeColor.RGB = RGB(68, 114, 196)
    End With
    Next
    End With
    End Sub

  3. #3
    Registered User
    Join Date
    11-17-2017
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    60

    Re: VBA for recolouring all series in a chart the same colour

    This is courtesy of yujin who helped me a few weeks ago, you can add more colours if needed in the array.

    It worked well for me, hope it does for you too.



    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Change colour of chart series with VBA
    By esbencito in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 10-17-2017, 10:06 PM
  2. Chart Series Automatic Colour
    By AndersonM in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-01-2016, 06:37 AM
  3. VBA to change column chart series colour
    By Jabba69 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2014, 11:51 AM
  4. Change colour of chart series
    By downunderthunder in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-06-2010, 09:20 PM
  5. Stacked Area Chart Series Colour Change
    By downunderthunder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2010, 09:18 PM
  6. Conditional Series Collection Colour for Chart
    By benno87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-24-2009, 09:54 PM
  7. how do I keep my data series colour when I refresh a pivot chart
    By reghog in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-29-2005, 09:30 AM

Tags for this Thread

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