+ Reply to Thread
Results 1 to 12 of 12

VBA Plotted Charts and Shapes stay invisible

  1. #1
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    VBA Plotted Charts and Shapes stay invisible

    I'm plotting charts and shapes.
    In let's say 6 out of 10 times, whatever I plot, stays invisible, until I zoom in or out.
    Is anybody experiencing anything similar?
    Is there a workaround?
    Thanks!

    Operating System:
    OSX El Capitan 10.11.6
    Excel for Mac:
    16.16.27 (201012)
    Last edited by 6StringJazzer; 04-16-2024 at 07:40 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Plotted Charts and Shapes stay invincible

    Please attach a sample file that demonstrates what you are seeing. See yellow banner at the top of the page.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    Re: VBA Plotted Charts and Shapes stay invincible

    Sorry, of course.

    The attached workbook contains several Modules to plot
    1. charts
    2. frames as buttons (transparent, with a red line for now) to highlight chart data
    3. "guidlines"

    Issues:
    1. plotted objects stay invincible. Only zooming in or out will let them show up.
    2. plot positions vary. Depending on the zoom level, chart areas and plot areas jump.
    I've managed to find the "right" zoom level to plot each chart by trial and error.
    And I've added these "working" zoom levels to each create chart macro:
    Please Login or Register  to view this content.
    This helps, but doesn't always work.

    I've also tried to use
    Please Login or Register  to view this content.
    Didn't notice any different behavior.

    Thank you!
    Attached Files Attached Files

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Plotted Charts and Shapes stay invincible

    I opened the file and the zoom was at 90% on the sheet. I could see all the charts without changing the zoom. Is your experience that you open this file and the charts are invisible*?

    *Not "invincible"

  5. #5
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    Re: VBA Plotted Charts and Shapes stay invisible

    No, if everything is done, everything is fine!

    It happens, while I'm plotting.
    Last edited by briskie; 04-15-2024 at 11:03 PM.

  6. #6
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    Re: VBA Plotted Charts and Shapes stay invisible

    Just looked up "invincible".
    Yes, "invisible".
    Thanks!
    Last edited by briskie; 04-15-2024 at 11:04 PM.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Plotted Charts and Shapes stay invincible

    How do I reproduce this? Do I just run your VBA Subs to make the plots? Do I have to delete existing plots first before I run the code?

  8. #8
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    Re: VBA Plotted Charts and Shapes stay invisible

    Please have a look at the new version, it now has buttons for every item, so you can just use these to plot and delete.
    To have a reference, I have renamed the existing charts (chart name + "Original"), so that they are not affected by the buttons.
    Also for test purposes, I have turned off (or should I say commented?)
    Please Login or Register  to view this content.
    in all create chart macros.

    The screenshots show: If I don't stick to the zoom level I found by trial and error, the chart is plotted in a slightly different area.
    Last edited by briskie; 04-16-2024 at 06:33 PM.

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Plotted Charts and Shapes stay invisible

    The code fails because the sheet is protected with a password.

  10. #10
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    Re: VBA Plotted Charts and Shapes stay invisible

    Oh, yes. It's "pw".

  11. #11
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Plotted Charts and Shapes stay invisible

    The chart names in your code don't match the actual chart names on the sheet. I manually deleted them then clicked the buttons to redraw.

    I am getting a gray placeholder instead of a complete chart. Not invisible, but not right either. Needs more research.

    charts.jpg

  12. #12
    Registered User
    Join Date
    03-10-2024
    Location
    Berlin
    MS-Off Ver
    mac2016
    Posts
    91

    Re: VBA Plotted Charts and Shapes stay invisible

    Yes, that's right. I purposely renamed the "original" charts, so that they would stay unaffected by the buttons.
    I did this to have a reference, to see, how much the plot is off, when plotting at a zoom level other than the one that works.
    For the meantime, I also set the charts area's fill to transparent to use the gridlines as temporary guidlines.

    The macros to create a chart are from different sources, I'm still learning, how to merge them.
    So for now, it's step by step, one macro for each step: create, color, label, frame.
    So to plot a chart, you would need to press the buttons one after another.
    It is also correct, that the charts are grey at first. I also did that on purpose to start with a neutral fill before applying the colors.

    Could you maybe just plot the first chart at a zoom level other than 110% and see, what happens?
    Does it exactly cover the original chart? Or is it off, like in my screenshots?
    And could you maybe check "Add Guidlines" and "Frame A" an see, if they appear, without having to change the zoom level?

    Thank you very much!
    Attached Files Attached Files

+ 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. [SOLVED] Neg or zero values cannot be plotted correctly on log charts... How to skip error msg.?
    By ChrisXcel in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-29-2021, 12:57 PM
  2. Replies: 11
    Last Post: 07-28-2020, 12:18 PM
  3. [SOLVED] Negative or zero values cannot be plotted correctly on log charts
    By NTE in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 03-28-2012, 11:32 AM
  4. Place shapes behind plotted chart elements (2007)
    By JayUSA in forum Excel General
    Replies: 4
    Last Post: 07-15-2009, 06:02 AM
  5. How to get charts and subtotals to stay permanent?
    By roxanne in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-19-2006, 12:20 AM
  6. [SOLVED] Controling how zero values are plotted in charts
    By crawshawpaul in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-21-2006, 04:40 PM
  7. [SOLVED] Excel Charts - Data being Plotted beyond Primary X-Axis Scale
    By Yvonne Fochesato in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-30-2005, 11:06 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