+ Reply to Thread
Results 1 to 5 of 5

Size of the plot area

  1. #1
    Registered User
    Join Date
    11-23-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Size of the plot area

    Hello

    I am currently working on a macro formatting charts. I would like it to defines the size of the plot area, but so far I have not succeed.

    (The macro recorder has not been very helpful...)

    Any idea?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Size of the plot area

    Macro recorder gave me enough code to get started.

    Please Login or Register  to view this content.
    From the macro code you can see that rather than use the selection object you can use the Plotarea object of the active chart to set size and position.
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Size of the plot area

    Hello,

    the Excel 2003 macro recorder captures plot area sizing nicely. What do you get?

    Here is the recorded code:

    Please Login or Register  to view this content.
    which should of course be cleaned up.

  4. #4
    Registered User
    Join Date
    11-23-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Size of the plot area

    Okay, I have finally understood where I was wrong. You have to define the position of the plot area before defining its size, otherwise it does not work.

    Many thanks.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Size of the plot area

    You are correct. You can not position or size any chart element such that it would exceed the chartarea dimensions.

    This may mean moving, sizing and moving again the object in order to get the desired result.

+ 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