+ Reply to Thread
Results 1 to 5 of 5

Chart Objects Cont'd

  1. #1
    Forum Contributor
    Join Date
    02-26-2012
    Location
    Ottawa, ON
    MS-Off Ver
    Excel 2007
    Posts
    129

    Chart Objects Cont'd

    Hello,

    I have made three buttons that make histograms which work. I wrote my code so that the plots are each placed in a specific location. However, if I click another button to get a separate chart, it is plotted on top of the other histogram, and both are moved to the location of the newly made histogram.

    Here is my code for one of the histograms. The other codes are pretty much the same. I have it so that if I ask to make a new histogram, the old histogram (with the same title) is deleted.

    Thank you.

    Please Login or Register  to view this content.
    Last edited by NatalieEC; 09-25-2014 at 09:33 AM.

  2. #2
    Spammer
    Join Date
    01-26-2010
    Location
    Worcester MA
    MS-Off Ver
    Excel 2003
    Posts
    184

    Re: Chart Objects Cont'd

    After

    Please Login or Register  to view this content.
    you should set a new chart object variable to the newly created chart, and position this chart explicitly:

    Please Login or Register  to view this content.
    This eliminates the possible (guaranteed?) confusion trying to identify charts based on chart title etc.
    Jon Peltier
    http://PeltierTech.com/

  3. #3
    Forum Contributor
    Join Date
    02-26-2012
    Location
    Ottawa, ON
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: Chart Objects Cont'd

    Thank you for your suggestion. I have tried implementing this idea, and it is not working yet unfortunately. My plots are still being plotted on top of each other and moving.

  4. #4
    Spammer
    Join Date
    01-26-2010
    Location
    Worcester MA
    MS-Off Ver
    Excel 2003
    Posts
    184

    Re: Chart Objects Cont'd

    Are you changing the right side of the equations in the "With ChtNew/End With" block?

  5. #5
    Forum Contributor
    Join Date
    02-26-2012
    Location
    Ottawa, ON
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: Chart Objects Cont'd

    Hi Jon,

    Sorry for my late reply.

    Yes, I did do that, and still no luck. However, on some other code, I was able to keep plots in place by referencing them by their index number.

    Thanks for your help!

+ 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. Chart Objects
    By NatalieEC in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2014, 02:58 PM
  2. How to Name Chart Objects
    By DCSwearingen in forum Excel General
    Replies: 2
    Last Post: 07-30-2006, 05:27 AM
  3. Chart Objects Error
    By Bill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2005, 01:05 AM
  4. Chart Objects
    By Bill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-18-2005, 09:05 AM
  5. [SOLVED] Protecting chart objects
    By julia.stone@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2005, 09:06 AM

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