+ Reply to Thread
Results 1 to 3 of 3

Thread: How can I maximize a chart since VBA 2007 has no sizewithwindow function anymore?

  1. #1
    Registered User
    Join Date
    09-22-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    2

    How can I maximize a chart since VBA 2007 has no sizewithwindow function anymore?

    A macro opens a chart:

    Sub ActivateChart()
            Sheets("NameOfChart").Select
    End Sub

    My goal is to maximize the width and height of the chart to fit exactly in every user window.
    I understand that VBA in Excel 2003 had a sizewithwindow property, but VBA in Excel 2007 not.
    Zooming the chart seems a solution, but I can't figure out how to do it.

    Thanks for suggesting some hints!

  2. #2
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,150

    Re: How can I maximize a chart since VBA 2007 has no sizewithwindow function anymore?

    Hello,

    you could place the chart in its own chart sheet. This way, it will always be resized according to the available space.

    cheers,

  3. #3
    Registered User
    Join Date
    09-22-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How can I maximize a chart since VBA 2007 has no sizewithwindow function anymore?

    Thanks Teylyn,

    I placed my chart in its own chart sheet. Indeed, the resizing is automatically done. I did not mentioned that the aspect ratio of my chart stays the same.
    So, a chart made to fit on a 4:3-screen is not filling a 16:9-screen.
    I would like my chart to fit exactly on every kind of screen (no matter what the aspect ratio is).

    Any ideas?

+ 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