+ Reply to Thread
Results 1 to 2 of 2

Macro to accommodate the chart size

  1. #1
    Registered User
    Join Date
    12-12-2011
    Location
    Essex
    MS-Off Ver
    Excel 2010
    Posts
    21

    Macro to accommodate the chart size

    Is there a way where macro can determine the chart size to accommodate it in the page setup area.
    Like, If it where table I could find the last column and accordingly determine its page area but what to do in case of charts?
    Any thoughts?
    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Macro to accommodate the chart size

    Hi,

    you can query the chart height and width by using

    ActiveSheet.Shapes("Chart 1").Height

    or

    ActiveSheet.Shapes("Chart 1").Width

    respectively. You can set the chart height and width by using code like the following. Just substitute the values with the ones you need

    Please Login or Register  to view this content.
    regards,

+ 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.6.0 RC 1