Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA to change graph option to interpolate (2003)

    Is there a snippet of code which will change "tools | options | chart | plot empty cells to " to Interpolate for all the charts in a workbook. I have 80 spreadsheets with 15 graphs in each I need to change and do not want to have to it manually.

    Thanks!!!

    Larry

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: VBA to change graph option to interpolate (2003)

    How about this?

    <pre>Option Explicit
    Sub InterpolateAllCharts()
    Dim cht As Chart
    Dim sht as Variant
    Dim ChtObj As ChartObject

    For Each cht In ActiveWorkbook.Charts
    cht.DisplayBlanksAs = xlInterpolated
    Next

    For Each sht In ActiveWorkbook.Sheets
    For Each ChtObj In sht.ChartObjects
    ChtObj.Chart.DisplayBlanksAs = xlInterpolated
    Next
    Next
    End Sub</pre>


    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •