Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003

    Unhappy Unanswered: Lay out of Excel chart with VBA

    How do I get a chart that listen to the lay out commands in VBA ?

    Commands like
    ActiveChart.Legend.Top = 300

    It seems to me that some automatic lay out mechanisms stays active, and undoes the VBA commands.
    The chart flickers during execution of the macro, and the result is inpredictable and ugly.

  2. #2
    Join Date
    Oct 2003
    Keep in mind that Charts in Excel are complicated and involve two different objects: Chart and ChartObject. In Excel when working with the chart, you seldom run into a problem. But in VBA there are properties and methods that "should work" but do not, because they are not specific to Chart or ChartObject.

    If you do much work with charts, then consider buying the book Excel Charts by John Walkenbach. It is the best investment you can make. Not only does he cover all the usual chart issues, he shows you how to do chart things that are consiered impossible. And he gives 4 chapters on creating charts with VBA.
    old, slow, and confused
    but at least I'm inconsistent!

    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  3. #3
    Join Date
    Nov 2003
    thanks Shade!
    I managed to get a reasonable result with try and error.
    Also the command 'Application.ScreenUpdating = false' helped a bit.
    Last edited by Baptist; 11-13-03 at 09:27.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts