+ Reply to Thread
Results 1 to 7 of 7

Set size of Plot Area

  1. #1
    Forum Contributor
    Join Date
    10-18-2018
    Location
    Amsterdam, Holland
    MS-Off Ver
    2013
    Posts
    104

    Set size of Plot Area

    Hi all,

    I got different charts wich i hide/show with a combobox.

    I would like that every chart looks exact the same. So i try to set the plot area size.

    I found this code online:

    Please Login or Register  to view this content.
    When i run it under combobox_change i get the following error:

    Run time error

    Method 'Width' of object 'PlotArea' failed.

    This line is highlighted:

    Please Login or Register  to view this content.
    When i change the number 100 to something else it keeps crashing.

    Someone knows what is going wrong?

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

    Re: Set size of Plot Area

    The syntax is okay.
    Can you post workbook example to illustrate the problem

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    10-18-2018
    Location
    Amsterdam, Holland
    MS-Off Ver
    2013
    Posts
    104

    Re: Set size of Plot Area

    Thanks for your reply.

    I stripped down the excel and added it.

    When you change the combobox that is on the chart it goes wrong.
    Attached Files Attached Files

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

    Re: Set size of Plot Area

    it does not like working on invisible chart objects.

    Please Login or Register  to view this content.
    You know there are multiple charts on that sheet right?

  5. #5
    Forum Contributor
    Join Date
    10-18-2018
    Location
    Amsterdam, Holland
    MS-Off Ver
    2013
    Posts
    104

    Re: Set size of Plot Area

    Yes, cause the comboboxes show different charts.
    It's not possible to combine everything i want in 1 chart.

    So it's really not possible, not even when the code fires after the chart is visible?

    If it's not, is there any other way to get the charts (plot size area) exactly the same?

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

    Re: Set size of Plot Area

    Set the plot area after you make a chart visible

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    10-18-2018
    Location
    Amsterdam, Holland
    MS-Off Ver
    2013
    Posts
    104

    Re: Set size of Plot Area

    That works, thank you very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to change plot area size of pivot chart
    By juamig in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 02-13-2016, 10:31 PM
  2. Replies: 4
    Last Post: 02-05-2016, 11:26 AM
  3. Replies: 0
    Last Post: 08-19-2013, 06:22 PM
  4. [SOLVED] Setting widths at the plot's left and right (inside the plot area)
    By simone77 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-07-2012, 08:32 AM
  5. Size of the plot area
    By shimuno in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 11-23-2011, 05:29 AM
  6. Set the plot area to centre based on cell size
    By JimmyA in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 10-19-2010, 11:16 AM
  7. [SOLVED] Resize chart area without resizing plot area
    By Janwillem van Dijk in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-01-2005, 09:05 PM
  8. [SOLVED] Resize chart area without resizing plot area
    By Janwillem van Dijk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2005, 09:05 PM

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