+ Reply to Thread
Results 1 to 3 of 3

Change chart parameters without immediately updating the chart

Hybrid View

  1. #1
    Registered User
    Join Date
    01-26-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    2

    Change chart parameters without immediately updating the chart

    Hello,

    I am currently using a VB application with Microsoft Excel 2007 that was previously used on the Excel 2003 version to generate a large number of charts based on a user-specified file. I have found that the 2007 version is considerably slower at generating these charts because it is slow at updating every parameter in the chart (using VB code).

    I have been curious if there is a way to change the parameters of a chart before drawing it to a sheet or without updating it immediately after every change.

    For example:

    With ActiveChart.Axes(xlValue)
            .MinimumScale = 16
            .MaximumScale = 26
            .MinorUnitIsAuto = True
            .MajorUnitIsAuto = True
            .Crosses = xlCustom
            .CrossesAt = 3
            .MajorGridlines.Border.ColorIndex = 48
    End With
    Could the generated chart be updated only after the entire With statement somehow? Or use a template Chart object to generate the entire graph at once (I've looked into Chart Wizard but it appears to be limited in functionality and may not even work properly in 2007).

    Thank you for your assistance, please let me know if you would like to clarify my situation further.

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

    Re: Change chart parameters without immediately updating the chart

    Do you turn screen updating off at all?

    Charts are slower to render in xl2007 if you have lots of data, this is due to the increased formats that can be applied to all the chart elements.

    For further assistance a sample workbook would help.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    01-26-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    2

    Re: Change chart parameters without immediately updating the chart

    Thank you!

    That command does exactly what I looking for, can't believe I didn't find it sooner.

    Referring to:

    Application.ScreenUpdating = False
    and

    Application.ScreenUpdating = True

+ 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