+ Reply to Thread
Results 1 to 16 of 16

Chart doesn't refresh after VBA rebuild

  1. #1
    Registered User
    Join Date
    01-04-2014
    Location
    Wegberg, Germany
    MS-Off Ver
    Excel 2007-2013
    Posts
    8

    Chart doesn't refresh after VBA rebuild

    Hi,

    I hav a big problem with a chart, what is damaged after using a SAP ADD IN. This ADD IN is a must be. So I have no other chance to rebuild the chart by VBA.
    Wht I do is :
    - get the chart as object
    - delete the seriescollection
    - rebuild it with new seriescollections.

    However, what I get is al blank plot area and no table beyond. The marveles thing is, after closing Exccel an open it the chart ist shown correctly.
    Thank you for looking, thinking and probably helping.

    Please don't mind my terrible English. What I do is :

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Chart doesn't refresh after VBA rebuild

    Is it possible that the "Set myChart = Nothing" at the end of the rebuild sub is responsible ?
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    01-04-2014
    Location
    Wegberg, Germany
    MS-Off Ver
    Excel 2007-2013
    Posts
    8

    Re: Chart doesn't refresh after VBA rebuild

    Unfortunatly not, when I delete this line nothing happens.

    But I've changed the code a bit. I do not delete all of seriesCollection. I leave one. Build my SeriesCollection new and delete the obsolete one after that.
    The result ist funny: Excel is showing now the plotArea, but not the DataTable beyond. The Data Table is very comprimized left and top of the screen. I haven't found any command to refresh the DataTable yet.
    Data Table.png

    After Closing Excel and reopen it everything is fine again.

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Chart doesn't refresh after VBA rebuild

    can you try
    Please Login or Register  to view this content.
    after you create the chart.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  5. #5
    Registered User
    Join Date
    01-04-2014
    Location
    Wegberg, Germany
    MS-Off Ver
    Excel 2007-2013
    Posts
    8

    Re: Chart doesn't refresh after VBA rebuild

    Sorry, but save does not work also.

  6. #6
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Chart doesn't refresh after VBA rebuild

    Try adding :-

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-04-2014
    Location
    Wegberg, Germany
    MS-Off Ver
    Excel 2007-2013
    Posts
    8

    Re: Chart doesn't refresh after VBA rebuild

    Thank you Andy, i have tried

    Please Login or Register  to view this content.
    )

    Does not work.

    And

    Please Login or Register  to view this content.
    did not work either.

  8. #8
    Forum Contributor
    Join Date
    10-30-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    173

    Re: Chart doesn't refresh after VBA rebuild

    If the problem started when you began to use the add-in then maybe it is switching off some important stuff in the application object...

    Have you tried including

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-04-2014
    Location
    Wegberg, Germany
    MS-Off Ver
    Excel 2007-2013
    Posts
    8

    Re: Chart doesn't refresh after VBA rebuild

    Thank´you coolblue,

    yes I've tried this as well without success.

  10. #10
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Chart doesn't refresh after VBA rebuild

    is it possible for you to post the chart with the data ?

  11. #11
    Registered User
    Join Date
    01-04-2014
    Location
    Wegberg, Germany
    MS-Off Ver
    Excel 2007-2013
    Posts
    8

    Re: Chart doesn't refresh after VBA rebuild

    Hello friends of VBA, the statement what is damaging my DataTabel is
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    01-04-2014
    Location
    Wegberg, Germany
    MS-Off Ver
    Excel 2007-2013
    Posts
    8

    Re: Chart doesn't refresh after VBA rebuild

    Hi xlbiznes,

    sorry this is not possible. Because of company secrets.
    What I try now ist to kill that beast of chart and create it brand new...

    To be continued....

  13. #13
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Chart doesn't refresh after VBA rebuild

    @B.Jones,

    I tried simulating your issue and it so happens that in this loop
    Please Login or Register  to view this content.
    i add a save after each loop like this

    Please Login or Register  to view this content.
    this messes up the data table and take it to the top

    Can you try

    Please Login or Register  to view this content.
    and then save to see what happens.

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

    Re: Chart doesn't refresh after VBA rebuild

    have you tried adding some Doevents and maybe a chart.refresh?
    Cheers
    Andy
    www.andypope.info

  15. #15
    Registered User
    Join Date
    01-04-2014
    Location
    Wegberg, Germany
    MS-Off Ver
    Excel 2007-2013
    Posts
    8

    Re: Chart doesn't refresh after VBA rebuild

    @xlbiznes

    Sorry, I try to include this statement. But it doesn't work, because I'Ve been asked to declare "Source". Btw : Object Chart do not support Method ADD. Where is my wrong thinking?

  16. #16
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Chart doesn't refresh after VBA rebuild


+ 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 doesn't refresh....
    By french_guy in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-11-2013, 11:35 AM
  2. Bad rebuild of screen after refresh data
    By KoenD in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2010, 01:22 PM
  3. UDF doesn't refresh result
    By nougain in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-21-2007, 01:22 AM
  4. External Data Range Name doesn't refresh
    By KHanna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-11-2006, 07:30 PM
  5. Replies: 0
    Last Post: 01-04-2006, 11:35 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