+ Reply to Thread
Results 1 to 10 of 10

cannot set plotarea size

Hybrid View

  1. #1
    Registered User
    Join Date
    08-27-2003
    Location
    Perth, Australia
    MS-Off Ver
    2000
    Posts
    47

    cannot set plotarea size

    Hi
    I'm trying to fix the size of the plot area of an embedded chart, but:
    ActiveChart.PlotArea.Height = 240
    doesn't seem to have any effect. The chart area is large enough to accomodate the change.

    Any suggestions?
    Nicky

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Nicky
    Hi
    I'm trying to fix the size of the plot area of an embedded chart, but:
    ActiveChart.PlotArea.Height = 240
    doesn't seem to have any effect. The chart area is large enough to accomodate the change.

    Any suggestions?
    Hi,

    What sort of chart, it should work,
        ActiveChart.PlotArea.Select
        Selection.Top = 1
        Selection.Width = 227
        Selection.Height = 240
    works for me.

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Registered User
    Join Date
    08-27-2003
    Location
    Perth, Australia
    MS-Off Ver
    2000
    Posts
    47
    Hi
    It's a mixed bar/line chart embedded on a worksheet (I have no problem with using this code on chart sheets). Either the size doesn't change, or sometimes it changes to a different size than I specify, but often it adjusts the plotarea height to the largest that will fit the chartarea (about 280 points, when I want it to be 240 high).

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Nicky
    Hi
    It's a mixed bar/line chart embedded on a worksheet (I have no problem with using this code on chart sheets). Either the size doesn't change, or sometimes it changes to a different size than I specify, but often it adjusts the plotarea height to the largest that will fit the chartarea (about 280 points, when I want it to be 240 high).
    Have you tried recording a Macro and manually setting the size to see what happens? - is there a hieght-width ratio setting with no room to adjust width?

    ---

  5. #5
    Registered User
    Join Date
    08-27-2003
    Location
    Perth, Australia
    MS-Off Ver
    2000
    Posts
    47
    Bryan, yes, I can change the height manually, there doesn't seem to be a fixed proportion of height to width. But when I record the action of setting the height and play it back, it doesn't work.

  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Nicky
    Bryan, yes, I can change the height manually, there doesn't seem to be a fixed proportion of height to width. But when I record the action of setting the height and play it back, it doesn't work.
    Hi,


    re-tested, and it should. Did you try the macro immediately after recording (and resizing) ?

    Could this be an old '95 or '97 book updated to the current version?

    Do other chart option 'set' correctly in this area of code, ie
    ActiveChart.ChartType = xlPie
    or
    ActiveChart.SeriesCollection(2).Select
    ActiveChart.SeriesCollection(2).AxisGroup = 1
    etc

    any more clues?
    ---

+ 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