Search code examples
minitab

Minitab - Auto-Updating Two Graphs From Two Sheets


I have a Minitab Project with two Worksheets. They are both linked two different cells in a single Excel sheet which update at specific intervals. So, each time the values in the Excel cells update they will be added onto the next row in the corresponding Minitab sheet.

Now, from each sheet in Minitab I have generated a control chart that auto-updates.

My problem is that only one chart will update, depending on which sheet is currently active.

Is there any way to circumvent this? I would like both charts to be able to update automatically and potentially have more sheets in the future, each with the same function.

I can make it work if I have two seperate Minitab projects open with one sheet each so it doesn't make sense to me that it isn't possible within the same project.

Hopefully there's a Minitab expert here that can help.


Solution

  • Thank you for the comment Richard Lusch. I have, however, managed to find a way to make my charts work for me.

    Like one or two of my previous questions I've been able to find my own solution, but maybe it will help somebody else.

    I did previously try to do the job without any code in Minitab. Just a link to the cells in Excel with a chart set to auto-update. As above this works fine with just one worksheet, but involving another sheet means that only the currently active sheet's chart will update.

    Now I've taken out the auto-updating chart. I have included the below code which will create a new chart every time there is a new value added. I didn't originally want to do this but I've figured out how to make it close all existing charts.

    IMRCHART C6 C7 C8 C9;
      STAMP C1;
      Display 25;
    GSAVE "L:\Public\********\AutoImport\Charts\width2dev.jpg";
      REPLACE;
      JPEG.
    
    GMAN;
    CLOSE;
    NoPROMPT;
    ALL.
    

    Now I'm wondering if there's a minitab function to make a sheet active...will explore...but for now this works.