+ Reply to Thread
Results 1 to 4 of 4

how do i hide a series in a graph with VBA code

  1. #1
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    how do i hide a series in a graph with VBA code

    I'm trying to hide a series in a graph. I can already hide a category but the series is tripping me up. So far I'm using the same code as the category but renaming it to series but its not working. I'm using

    Please Login or Register  to view this content.
    Im getting an error 438

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: how do i hide a series in a graph with VBA code

    Try something like this for a line graph...
    ActiveChart.ChartGroups(1).SeriesCollection(1).Format.Line.Visible = msoFalse

    Another trick is to just hide the data column for the series e.g.; if SeriesCollection(1) is data from column B...
    Columns("B").Hidden = True
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: how do i hide a series in a graph with VBA code

    Thanks that worked great Does the .isfiltered not work with the series as it does with category? Just curious why my original didnt work.

  4. #4
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: how do i hide a series in a graph with VBA code

    In case anyone wants to know i found out how to filter instead of hide. Code should look like this for series,

    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. [SOLVED] Color Formatting of Graph Series (via Graph Series Label)
    By James McEwan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-26-2015, 06:51 AM
  2. [SOLVED] Move from one series to the next series in a graph shortcut
    By nredman in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-17-2014, 02:45 AM
  3. [SOLVED] Second Axis for a Graph but with the same kind of graph for the two series?
    By Marceltcm in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-18-2013, 05:37 AM
  4. varied series for graph which adjusts series
    By sput_sput in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-06-2010, 02:54 PM
  5. Show/Hide series in a graph
    By Coaster in forum Excel General
    Replies: 6
    Last Post: 05-02-2010, 10:44 AM
  6. Two Series Graph-Add Line Graph To It?
    By TomBrooklyn in forum Excel General
    Replies: 1
    Last Post: 04-21-2005, 04:38 PM
  7. series graph -- one series being added to another series
    By rich zielinski via OfficeKB.com in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-30-2005, 02:06 PM

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