Hello everyone,
I am working simultaneously with multiple instances of Excel, as this is a way to utilize more CPU and decrease calculation time per instance. Basically, there is one "Master" instance and several "Slave" instances. When I start the day, I first open the Master Instance, and from that instance I have a lot of code that does the rest of the work for me. So from the Master instance, I first run the code "Open_All_Slaves" which opens my 4 slaves instances. Once the slaves are open, the Master has various codes that cause each slaves to perform some tasks. For example, Master can ask Slave 1 to run a certain of its own code (let's call that "Slave_1_Code"), or Master can instruct each slave to copy and paste some information etc, or Master can change a setpoint on one of the scalp, for example, if the Temperature setpoint on Scalp 2 is 48C, Master can instruct Scalp 2 to change that setpoint from 48C to 50C. That structure enables me to have a very efficient Dashboard view in Master with bunch of control buttons, and each Slave do the heavy lifting and communicates back some results to Master. Each Slave and Master exchange data via a my local SQL database and I recently took all my charts out of Excel and put them into PowerBI, which receives live date from SQL.
My problem is that one or more of the Instances will freeze from time to time, and I can't pinpoint what causes the freeze. Sometimes it will happen right at the beginning when I run the "Open_All_Slaves", sometimes it freezes when I run a specific code from Master, and sometimes everything goes well for hours, I run a ton of codes without freeze and then out of nowhere an Instance freezes.
I looked on most forums and can't find the answer to this issue. My feeling is that there is a certain messagebox that arise in one of the Slave that cause a message box to pop up, and because the user can't click Yes/No, the Slave goes into an endless waiting period and freezes.
I tried to strategically place some "On error Resume Next" and "Application.DisplayAlerts = False" in different locations of the code, but can't find what really works. I am really running out of ideas here.
I have one of the strongest CPU available on the market these days, 48 GB Ram, 2 NVIDIA P1000, run Windows 10 Pro with Excel 2019. The CPU is rarely used at more than 25% and the Ram usage is normally less than 50% adn each excel file are quite small at less than 2MB.
Thanks for the help!
I am working simultaneously with multiple instances of Excel, as this is a way to utilize more CPU and decrease calculation time per instance. Basically, there is one "Master" instance and several "Slave" instances. When I start the day, I first open the Master Instance, and from that instance I have a lot of code that does the rest of the work for me. So from the Master instance, I first run the code "Open_All_Slaves" which opens my 4 slaves instances. Once the slaves are open, the Master has various codes that cause each slaves to perform some tasks. For example, Master can ask Slave 1 to run a certain of its own code (let's call that "Slave_1_Code"), or Master can instruct each slave to copy and paste some information etc, or Master can change a setpoint on one of the scalp, for example, if the Temperature setpoint on Scalp 2 is 48C, Master can instruct Scalp 2 to change that setpoint from 48C to 50C. That structure enables me to have a very efficient Dashboard view in Master with bunch of control buttons, and each Slave do the heavy lifting and communicates back some results to Master. Each Slave and Master exchange data via a my local SQL database and I recently took all my charts out of Excel and put them into PowerBI, which receives live date from SQL.
My problem is that one or more of the Instances will freeze from time to time, and I can't pinpoint what causes the freeze. Sometimes it will happen right at the beginning when I run the "Open_All_Slaves", sometimes it freezes when I run a specific code from Master, and sometimes everything goes well for hours, I run a ton of codes without freeze and then out of nowhere an Instance freezes.
I looked on most forums and can't find the answer to this issue. My feeling is that there is a certain messagebox that arise in one of the Slave that cause a message box to pop up, and because the user can't click Yes/No, the Slave goes into an endless waiting period and freezes.
I tried to strategically place some "On error Resume Next" and "Application.DisplayAlerts = False" in different locations of the code, but can't find what really works. I am really running out of ideas here.
I have one of the strongest CPU available on the market these days, 48 GB Ram, 2 NVIDIA P1000, run Windows 10 Pro with Excel 2019. The CPU is rarely used at more than 25% and the Ram usage is normally less than 50% adn each excel file are quite small at less than 2MB.
Thanks for the help!