+ Reply to Thread
Results 1 to 3 of 3

Thread: Change active Chart

  1. #1
    Valued Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    200

    Change active Chart

    Hi all, I cannot find a way to change the shape of an active chart

    Macro recorded of this particluar chart object
    Sub ResizeGraph()
        ActiveSheet.Shapes("Chart 138").ScaleWidth 1.67, msoFalse, msoScaleFromTopLeft
        ActiveSheet.Shapes("Chart 138").ScaleHeight 1.71, msoFalse, _
            msoScaleFromTopLeft
    End Sub
    But then I will have to keep changing the Chart numbers to make the shape change.
    So in what syntax should I use to make the active Chart (no matter what number they are unless one chart is active) change shape? Thanks in advance
    Last edited by unley; 03-24-2010 at 04:17 PM.
    I'm using MS Office 2007

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Change active Chart

    With Activechart.parent
        .Width = .Width * 1.67
        .Height = .Height * 1.71
    End with
    Cheers
    Andy
    www.andypope.info

  3. #3
    Valued Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    200

    Re: Change active Chart

    Gee, it looks so simple lol and works well, thank you Andy for your help, much appreciate this
    I'm using MS Office 2007

+ Reply to Thread

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.2.0